mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix(writeapi): more tweaks to schema files
This commit is contained in:
@@ -11,6 +11,24 @@ put:
|
|||||||
required: true
|
required: true
|
||||||
description: backend id of the setting to update
|
description: backend id of the setting to update
|
||||||
example: maximumRelatedTopics
|
example: maximumRelatedTopics
|
||||||
|
- in: path
|
||||||
|
name: value
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: the value of the new setting
|
||||||
|
example: 2
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
description: the value of the new setting
|
||||||
|
example: 2
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Admin setting updated
|
description: Admin setting updated
|
||||||
|
|||||||
@@ -13,10 +13,9 @@ delete:
|
|||||||
path:
|
path:
|
||||||
type: string
|
type: string
|
||||||
description: Path to the file (relative to the configured `upload_path`)
|
description: Path to the file (relative to the configured `upload_path`)
|
||||||
|
example: files/test.txt
|
||||||
required:
|
required:
|
||||||
- path
|
- path
|
||||||
example:
|
|
||||||
path: files/uploaded_file.jpg
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: File deleted
|
description: File deleted
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ put:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: a valid post id
|
description: a valid post id
|
||||||
example: 1
|
example: 2
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Post successfully bookmarked
|
description: Post successfully bookmarked
|
||||||
@@ -36,7 +36,7 @@ delete:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: a valid post id
|
description: a valid post id
|
||||||
example: 1
|
example: 2
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Post successfully unbookmarked
|
description: Post successfully unbookmarked
|
||||||
|
|||||||
@@ -1,29 +1,3 @@
|
|||||||
put:
|
|
||||||
tags:
|
|
||||||
- posts
|
|
||||||
summary: restore a post
|
|
||||||
description: This operation restores a post.
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: pid
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
required: true
|
|
||||||
description: a valid post id
|
|
||||||
example: 1
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Topic successfully restored
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
status:
|
|
||||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
|
||||||
response:
|
|
||||||
type: object
|
|
||||||
properties: {}
|
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- posts
|
- posts
|
||||||
@@ -36,10 +10,36 @@ delete:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: a valid post id
|
description: a valid post id
|
||||||
example: 1
|
example: 2
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Post successfully deleted
|
description: Post successfully deleted
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||||
|
response:
|
||||||
|
type: object
|
||||||
|
properties: {}
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- posts
|
||||||
|
summary: restore a post
|
||||||
|
description: This operation restores a post.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: pid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid post id
|
||||||
|
example: 2
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Topic successfully restored
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ put:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: a valid post id
|
description: a valid post id
|
||||||
example: 1
|
example: 2
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
@@ -21,8 +21,7 @@ put:
|
|||||||
delta:
|
delta:
|
||||||
type: number
|
type: number
|
||||||
description: Positive integer for upvote, negative integer for downvote (0 to unvote.)
|
description: Positive integer for upvote, negative integer for downvote (0 to unvote.)
|
||||||
example:
|
example: 1
|
||||||
delta: 1
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Post successfully upvoted
|
description: Post successfully upvoted
|
||||||
@@ -41,6 +40,14 @@ delete:
|
|||||||
- posts
|
- posts
|
||||||
summary: unvote a post
|
summary: unvote a post
|
||||||
description: This operation removes a pre-cast vote on a post.
|
description: This operation removes a pre-cast vote on a post.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: pid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid post id
|
||||||
|
example: 2
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Post successfully unvoted
|
description: Post successfully unvoted
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ delete:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: a valid topic id
|
description: a valid topic id
|
||||||
example: 2
|
example: 3
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully purged
|
description: Topic successfully purged
|
||||||
|
|||||||
Reference in New Issue
Block a user