mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-01 21:30:30 +01:00
fix(writeapi): fix components, + tag object schema
This commit is contained in:
@@ -85,6 +85,22 @@ PostObject:
|
||||
nullable: true
|
||||
titleRaw:
|
||||
type: string
|
||||
oldTitle:
|
||||
type: string
|
||||
isMainPost:
|
||||
type: boolean
|
||||
renamed:
|
||||
type: true
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../components/schemas/TagObject.yaml#/TagObject
|
||||
required:
|
||||
- uid
|
||||
- tid
|
||||
- cid
|
||||
- title
|
||||
- slug
|
||||
category:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
19
public/openapi/components/schemas/TagObject.yaml
Normal file
19
public/openapi/components/schemas/TagObject.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
TagObject:
|
||||
type: object
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
description: The tag name
|
||||
score:
|
||||
type: number
|
||||
description: The number of topics containing this tag
|
||||
valueEscaped:
|
||||
type: string
|
||||
color:
|
||||
type: string
|
||||
description: Six-character hexadecimal string (with `#` prepended)
|
||||
example: "#ff0000"
|
||||
bgColor:
|
||||
type: string
|
||||
description: Six-character hexadecimal string (with `#` prepended)
|
||||
example: "#ff0000"
|
||||
@@ -14,22 +14,5 @@ get:
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
description: The tag name
|
||||
score:
|
||||
type: number
|
||||
description: The number of topics containing this tag
|
||||
valueEscaped:
|
||||
type: string
|
||||
color:
|
||||
type: string
|
||||
description: Six-character hexadecimal string (with `#` prepended)
|
||||
example: "#ff0000"
|
||||
bgColor:
|
||||
type: string
|
||||
description: Six-character hexadecimal string (with `#` prepended)
|
||||
example: "#ff0000"
|
||||
$ref: ../../../components/schemas/TagObject.yaml#/TagObject
|
||||
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps
|
||||
@@ -16,21 +16,7 @@ get:
|
||||
type: array
|
||||
description: An array of tags sorted by the most topics
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
description: The raw tag
|
||||
score:
|
||||
type: number
|
||||
description: Number of topics tagged by this tag
|
||||
valueEscaped:
|
||||
type: string
|
||||
description: This is the escaped tag value, equal to validator.escape(value)
|
||||
color:
|
||||
type: string
|
||||
bgColor:
|
||||
type: string
|
||||
$ref: ../components/schemas/TagObject.yaml#/TagObject
|
||||
displayTagSearch:
|
||||
type: boolean
|
||||
nextStart:
|
||||
|
||||
@@ -200,18 +200,7 @@ get:
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
valueEscaped:
|
||||
type: string
|
||||
color:
|
||||
type: string
|
||||
bgColor:
|
||||
type: string
|
||||
score:
|
||||
type: number
|
||||
$ref: ../../components/schemas/TagObject.yaml#/TagObject
|
||||
isOwner:
|
||||
type: boolean
|
||||
ignored:
|
||||
|
||||
@@ -89,18 +89,7 @@ get:
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
valueEscaped:
|
||||
type: string
|
||||
color:
|
||||
type: string
|
||||
bgColor:
|
||||
type: string
|
||||
score:
|
||||
type: number
|
||||
$ref: ../../../../components/schemas/TagObject.yaml#/TagObject
|
||||
posts:
|
||||
type: array
|
||||
items:
|
||||
|
||||
@@ -189,18 +189,7 @@ get:
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
valueEscaped:
|
||||
type: string
|
||||
color:
|
||||
type: string
|
||||
bgColor:
|
||||
type: string
|
||||
score:
|
||||
type: number
|
||||
$ref: ../components/schemas/TagObject.yaml#/TagObject
|
||||
isOwner:
|
||||
type: boolean
|
||||
ignored:
|
||||
|
||||
@@ -39,7 +39,14 @@ put:
|
||||
status:
|
||||
$ref: ../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
$ref: ../../components/schemas/PostObject.yaml#/PostObject
|
||||
allOf:
|
||||
- $ref: ../../components/schemas/PostObject.yaml#/PostObject
|
||||
- type: object
|
||||
properties:
|
||||
edited:
|
||||
type: boolean
|
||||
deleterUid:
|
||||
type: number
|
||||
delete:
|
||||
tags:
|
||||
- posts
|
||||
|
||||
Reference in New Issue
Block a user