mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-21 15:03:12 +01:00
docs: update openapi schema for missing routes related to crossposting
This commit is contained in:
@@ -1,32 +1,50 @@
|
||||
CrosspostObject:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The cross-post ID
|
||||
cid:
|
||||
type: object
|
||||
description: The category id that the topic was cross-posted to
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: number
|
||||
tid:
|
||||
type: object
|
||||
description: The topic id that was cross-posted
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: number
|
||||
timestamp:
|
||||
type: number
|
||||
uid:
|
||||
type: object
|
||||
description: The user id that initiated the cross-post
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: number
|
||||
anyOf:
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The cross-post ID
|
||||
cid:
|
||||
type: object
|
||||
description: The category id that the topic was cross-posted to
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: number
|
||||
tid:
|
||||
type: object
|
||||
description: The topic id that was cross-posted
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: number
|
||||
timestamp:
|
||||
type: number
|
||||
uid:
|
||||
type: object
|
||||
description: The user id that initiated the cross-post
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: number
|
||||
- type: object
|
||||
properties:
|
||||
category:
|
||||
type: object
|
||||
properties:
|
||||
cid:
|
||||
type: number
|
||||
name:
|
||||
type: string
|
||||
icon:
|
||||
type: string
|
||||
bgColor:
|
||||
type: string
|
||||
color:
|
||||
type: string
|
||||
slug:
|
||||
type: string
|
||||
CrosspostsArray:
|
||||
type: array
|
||||
description: A list of crosspost objects
|
||||
|
||||
@@ -212,6 +212,10 @@ get:
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
crossposts:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../components/schemas/CrosspostObject.yaml#/CrosspostObject
|
||||
- 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:
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
get:
|
||||
tags:
|
||||
- topics
|
||||
summary: get topic crossposts
|
||||
description: This operation retrieves a list of crossposts for the requested topic
|
||||
parameters:
|
||||
- in: path
|
||||
name: tid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid topic id
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Topic crossposts retrieved
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
crossposts:
|
||||
$ref: ../../../components/schemas/CrosspostObject.yaml#/CrosspostsArray
|
||||
post:
|
||||
tags:
|
||||
- topics
|
||||
|
||||
Reference in New Issue
Block a user