mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix(writeapi): added examples to all parameter objects in schema
This commit is contained in:
@@ -10,6 +10,7 @@ put:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: backend id of the setting to update
|
description: backend id of the setting to update
|
||||||
|
example: maximumRelatedTopics
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Admin setting updated
|
description: Admin setting updated
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- groups
|
- groups
|
||||||
summary: join a group
|
summary: join a group
|
||||||
description: This operation joins an existing group, or causes another user to join a group. If the group is private and you are not an administrator, this method will cause that user to request membership, instead. For user _invitations_, you'll want to call `PUT /groups/{slug}/invites/{uid}`.
|
description: This operation joins an existing group, or causes another user to join a group. If the group is private and you are not an administrator, this method will cause that user to request membership, instead. For user _invitations_, you'll want to call `PUT /groups/{slug}/invites/{uid}`.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: slug
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: slug of the group you would like to join
|
||||||
|
example: my-group
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: group successfully joined, or membership requested
|
description: group successfully joined, or membership requested
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- posts
|
- posts
|
||||||
summary: edit a post
|
summary: edit a post
|
||||||
description: This operation edits a post
|
description: This operation edits a post
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: pid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid post id
|
||||||
|
example: 1
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
@@ -38,6 +46,14 @@ delete:
|
|||||||
- posts
|
- posts
|
||||||
summary: purge a post
|
summary: purge a post
|
||||||
description: This operation purges a post.
|
description: This operation purges a post.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: pid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid post id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Post successfully purged
|
description: Post successfully purged
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- posts
|
- posts
|
||||||
summary: bookmark a post
|
summary: bookmark a post
|
||||||
description: This operation bookmarks a post.
|
description: This operation bookmarks a post.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: pid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid post id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Post successfully bookmarked
|
description: Post successfully bookmarked
|
||||||
@@ -21,6 +29,14 @@ delete:
|
|||||||
- posts
|
- posts
|
||||||
summary: unbookmark a post
|
summary: unbookmark a post
|
||||||
description: This operation unbookmarks a post.
|
description: This operation unbookmarks a post.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: pid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid post id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Post successfully unbookmarked
|
description: Post successfully unbookmarked
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- posts
|
- posts
|
||||||
summary: restore a post
|
summary: restore a post
|
||||||
description: This operation restores 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:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully restored
|
description: Topic successfully restored
|
||||||
@@ -21,6 +29,14 @@ delete:
|
|||||||
- posts
|
- posts
|
||||||
summary: deletes a post
|
summary: deletes a post
|
||||||
description: This operation soft deletes a post.
|
description: This operation soft deletes a post.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: pid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid post id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Post successfully deleted
|
description: Post successfully deleted
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- posts
|
- posts
|
||||||
summary: vote on a post
|
summary: vote on a post
|
||||||
description: This operation casts a vote on a post.
|
description: This operation casts a vote on a post.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: pid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid post id
|
||||||
|
example: 1
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ post:
|
|||||||
- topics
|
- topics
|
||||||
summary: peply to a topic
|
summary: peply to a topic
|
||||||
description: This operation creates a new reply to an existing topic.
|
description: This operation creates a new reply to an existing topic.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
@@ -37,6 +45,14 @@ delete:
|
|||||||
- topics
|
- topics
|
||||||
summary: delete a topic
|
summary: delete a topic
|
||||||
description: This operation purges a topic and all of its posts (careful, there is no confirmation!)
|
description: This operation purges a topic and all of its posts (careful, there is no confirmation!)
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully purged
|
description: Topic successfully purged
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- topics
|
- topics
|
||||||
summary: follow a topic
|
summary: follow a topic
|
||||||
description: This operation follows (or watches) a topic.
|
description: This operation follows (or watches) a topic.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully followed
|
description: Topic successfully followed
|
||||||
@@ -21,6 +29,14 @@ delete:
|
|||||||
- topics
|
- topics
|
||||||
summary: unfollow a topic
|
summary: unfollow a topic
|
||||||
description: This operation unfollows (or unwatches) a topic.
|
description: This operation unfollows (or unwatches) a topic.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully unwatched
|
description: Topic successfully unwatched
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- topics
|
- topics
|
||||||
summary: ignore a topic
|
summary: ignore a topic
|
||||||
description: This operation ignores (or watches) a topic.
|
description: This operation ignores (or watches) a topic.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully ignored
|
description: Topic successfully ignored
|
||||||
@@ -21,6 +29,14 @@ delete:
|
|||||||
- topics
|
- topics
|
||||||
summary: unignore a topic
|
summary: unignore a topic
|
||||||
description: This operation unignores (or unfollows/unwatches) a topic. It is functionally identical to `DEL /topics/{tid}/follow`.
|
description: This operation unignores (or unfollows/unwatches) a topic. It is functionally identical to `DEL /topics/{tid}/follow`.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully unignored/unwatched
|
description: Topic successfully unignored/unwatched
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- topics
|
- topics
|
||||||
summary: lock a topic
|
summary: lock a topic
|
||||||
description: This operation locks an existing topic.
|
description: This operation locks an existing topic.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully locked
|
description: Topic successfully locked
|
||||||
@@ -21,6 +29,14 @@ delete:
|
|||||||
- topics
|
- topics
|
||||||
summary: unlock a topic
|
summary: unlock a topic
|
||||||
description: This operation unlocks a topic.
|
description: This operation unlocks a topic.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully unlocked
|
description: Topic successfully unlocked
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- topics
|
- topics
|
||||||
summary: pin a topic
|
summary: pin a topic
|
||||||
description: This operation pins an existing 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
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully pinned
|
description: Topic successfully pinned
|
||||||
@@ -21,6 +29,14 @@ delete:
|
|||||||
- topics
|
- topics
|
||||||
summary: unpin a topic
|
summary: unpin a topic
|
||||||
description: This operation unpins 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:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully unpinned
|
description: Topic successfully unpinned
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ delete:
|
|||||||
- topics
|
- topics
|
||||||
summary: delete a topic
|
summary: delete a topic
|
||||||
description: This operation deletes an existing topic.
|
description: This operation deletes an existing topic.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully deleted
|
description: Topic successfully deleted
|
||||||
@@ -21,6 +29,14 @@ put:
|
|||||||
- topics
|
- topics
|
||||||
summary: restore a topic
|
summary: restore a topic
|
||||||
description: This operation restores a topic.
|
description: This operation restores a topic.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic successfully restored
|
description: Topic successfully restored
|
||||||
|
|||||||
@@ -3,6 +3,14 @@ put:
|
|||||||
- topics
|
- topics
|
||||||
summary: adds tags to a topic
|
summary: adds tags to a topic
|
||||||
description: This operation adds tags to a topic
|
description: This operation adds tags to a topic
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
@@ -37,6 +45,14 @@ delete:
|
|||||||
- topics
|
- topics
|
||||||
summary: Removes all tags from a topic
|
summary: Removes all tags from a topic
|
||||||
description: This operation removed all tags associated with a topic.
|
description: This operation removed all tags associated with a topic.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: tid
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: a valid topic id
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Topic tags successfully removed.
|
description: Topic tags successfully removed.
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ delete:
|
|||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
description: uid of the user to delete
|
description: uid of the user to delete
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: user account deleted
|
description: user account deleted
|
||||||
@@ -32,6 +33,7 @@ put:
|
|||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
description: uid of the user to update
|
description: uid of the user to update
|
||||||
|
example: 1
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ put:
|
|||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
description: uid of the user to ban
|
description: uid of the user to ban
|
||||||
|
example: 1
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@@ -45,6 +46,7 @@ delete:
|
|||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
description: uid of the user to unban
|
description: uid of the user to unban
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successfully unbanned user
|
description: successfully unbanned user
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ post:
|
|||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
description: uid of the user to follow
|
description: uid of the user to follow
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successfully followed user
|
description: successfully followed user
|
||||||
@@ -32,6 +33,7 @@ delete:
|
|||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
description: uid of the user to unfollow
|
description: uid of the user to unfollow
|
||||||
|
example: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successfully unfollowed user
|
description: successfully unfollowed user
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ put:
|
|||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
description: uid of the user to update
|
description: uid of the user to update
|
||||||
|
example: 1
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ put:
|
|||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
description: uid of the user
|
description: uid of the user
|
||||||
|
example: 1
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ delete:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: a valid API token
|
description: a valid API token
|
||||||
|
example: 6d03a630-86fd-4515-9a35-e957502f4f89
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successfully deleted user token
|
description: successfully deleted user token
|
||||||
|
|||||||
Reference in New Issue
Block a user