Files
NodeBB/public/openapi/write/topics/tid/pin.yaml
Julian Lam b3787bd50c fix: update openapi spec to specify optional expiry argument available to be passed in via request body.
Also updated test runner to ignore any request bodies in spec that are explicitly not required.
2023-05-01 11:55:00 -04:00

63 lines
1.5 KiB
YAML

put:
tags:
- topics
summary: pin a topic
description: This operation pins an existing topic.
parameters:
- in: path
name: tid
schema:
type: string
required: true
description: a valid topic id
example: 1
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
expiry:
type: number
description: A UNIX timestamp representing the moment the topic will be unpinned.
example: 1585337827953
responses:
'200':
description: Topic successfully pinned
content:
application/json:
schema:
type: object
properties:
status:
$ref: ../../../components/schemas/Status.yaml#/Status
response:
type: object
properties: {}
delete:
tags:
- topics
summary: unpin a topic
description: This operation unpins a topic.
parameters:
- in: path
name: tid
schema:
type: string
required: true
description: a valid topic id
example: 1
responses:
'200':
description: Topic successfully unpinned
content:
application/json:
schema:
type: object
properties:
status:
$ref: ../../../components/schemas/Status.yaml#/Status
response:
type: object
properties: {}