mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 02:27:22 +02:00
chore(spec): replace ugly hack with another hack for optional properties
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
TopicObject:
|
TopicObject:
|
||||||
type: object
|
allOf:
|
||||||
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
tid:
|
tid:
|
||||||
type: number
|
type: number
|
||||||
@@ -221,38 +222,13 @@ TopicObject:
|
|||||||
description: HTML injected into the theme
|
description: HTML injected into the theme
|
||||||
index:
|
index:
|
||||||
type: number
|
type: number
|
||||||
|
- type: object
|
||||||
|
description: Optional properties that may or may not be present (except for `tid`, which is always present, and is only here as a hack to pass validation)
|
||||||
|
properties:
|
||||||
|
tid:
|
||||||
|
type: number
|
||||||
|
description: A topic identifier
|
||||||
thumb:
|
thumb:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- tid
|
- tid
|
||||||
- uid
|
|
||||||
- cid
|
|
||||||
- mainPid
|
|
||||||
- title
|
|
||||||
- slug
|
|
||||||
- timestamp
|
|
||||||
- lastposttime
|
|
||||||
- postcount
|
|
||||||
- viewcount
|
|
||||||
- teaserPid
|
|
||||||
- upvotes
|
|
||||||
- downvotes
|
|
||||||
- deleted
|
|
||||||
- locked
|
|
||||||
- pinned
|
|
||||||
- deleterUid
|
|
||||||
- titleRaw
|
|
||||||
- timestampISO
|
|
||||||
- lastposttimeISO
|
|
||||||
- votes
|
|
||||||
- category
|
|
||||||
- user
|
|
||||||
- teaser
|
|
||||||
- tags
|
|
||||||
- isOwner
|
|
||||||
- ignored
|
|
||||||
- unread
|
|
||||||
- bookmark
|
|
||||||
- unreplied
|
|
||||||
- icons
|
|
||||||
- index
|
|
||||||
@@ -403,6 +403,17 @@ get:
|
|||||||
type: number
|
type: number
|
||||||
loggedInUser:
|
loggedInUser:
|
||||||
$ref: ../../components/schemas/UserObject.yaml#/UserObject
|
$ref: ../../components/schemas/UserObject.yaml#/UserObject
|
||||||
|
- type: object
|
||||||
|
description: Optional properties that may or may not be present (except for `tid`, which is always present, and is only here as a hack to pass validation)
|
||||||
|
properties:
|
||||||
|
tid:
|
||||||
|
type: number
|
||||||
|
description: A topic identifier
|
||||||
|
thumb:
|
||||||
|
type: string
|
||||||
|
description: An uploaded topic thumbnail
|
||||||
|
required:
|
||||||
|
- tid
|
||||||
- $ref: ../../components/schemas/Pagination.yaml#/Pagination
|
- $ref: ../../components/schemas/Pagination.yaml#/Pagination
|
||||||
- $ref: ../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
|
- $ref: ../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
|
||||||
- $ref: ../../components/schemas/CommonProps.yaml#/CommonProps
|
- $ref: ../../components/schemas/CommonProps.yaml#/CommonProps
|
||||||
Reference in New Issue
Block a user