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
|
||||
required: true
|
||||
description: backend id of the setting to update
|
||||
example: maximumRelatedTopics
|
||||
responses:
|
||||
'200':
|
||||
description: Admin setting updated
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- groups
|
||||
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}`.
|
||||
parameters:
|
||||
- in: path
|
||||
name: slug
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: slug of the group you would like to join
|
||||
example: my-group
|
||||
responses:
|
||||
'200':
|
||||
description: group successfully joined, or membership requested
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- posts
|
||||
summary: edit 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:
|
||||
required: true
|
||||
content:
|
||||
@@ -38,6 +46,14 @@ delete:
|
||||
- posts
|
||||
summary: purge 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:
|
||||
'200':
|
||||
description: Post successfully purged
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- posts
|
||||
summary: bookmark 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:
|
||||
'200':
|
||||
description: Post successfully bookmarked
|
||||
@@ -21,6 +29,14 @@ delete:
|
||||
- posts
|
||||
summary: unbookmark 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:
|
||||
'200':
|
||||
description: Post successfully unbookmarked
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- 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
|
||||
@@ -21,6 +29,14 @@ delete:
|
||||
- posts
|
||||
summary: 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:
|
||||
'200':
|
||||
description: Post successfully deleted
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- posts
|
||||
summary: 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:
|
||||
required: true
|
||||
content:
|
||||
|
||||
@@ -3,6 +3,14 @@ post:
|
||||
- topics
|
||||
summary: peply to a 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:
|
||||
required: true
|
||||
content:
|
||||
@@ -37,6 +45,14 @@ delete:
|
||||
- topics
|
||||
summary: delete a topic
|
||||
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:
|
||||
'200':
|
||||
description: Topic successfully purged
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- topics
|
||||
summary: follow 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:
|
||||
'200':
|
||||
description: Topic successfully followed
|
||||
@@ -21,6 +29,14 @@ delete:
|
||||
- topics
|
||||
summary: unfollow 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:
|
||||
'200':
|
||||
description: Topic successfully unwatched
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- topics
|
||||
summary: ignore 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:
|
||||
'200':
|
||||
description: Topic successfully ignored
|
||||
@@ -21,6 +29,14 @@ delete:
|
||||
- topics
|
||||
summary: unignore a topic
|
||||
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:
|
||||
'200':
|
||||
description: Topic successfully unignored/unwatched
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- topics
|
||||
summary: lock a 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:
|
||||
'200':
|
||||
description: Topic successfully locked
|
||||
@@ -21,6 +29,14 @@ delete:
|
||||
- topics
|
||||
summary: unlock 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:
|
||||
'200':
|
||||
description: Topic successfully unlocked
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- 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
|
||||
responses:
|
||||
'200':
|
||||
description: Topic successfully pinned
|
||||
@@ -21,6 +29,14 @@ delete:
|
||||
- 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
|
||||
|
||||
@@ -3,6 +3,14 @@ delete:
|
||||
- topics
|
||||
summary: delete a 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:
|
||||
'200':
|
||||
description: Topic successfully deleted
|
||||
@@ -21,6 +29,14 @@ put:
|
||||
- topics
|
||||
summary: restore 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:
|
||||
'200':
|
||||
description: Topic successfully restored
|
||||
|
||||
@@ -3,6 +3,14 @@ put:
|
||||
- topics
|
||||
summary: 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:
|
||||
required: true
|
||||
content:
|
||||
@@ -37,6 +45,14 @@ delete:
|
||||
- topics
|
||||
summary: Removes all tags from 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:
|
||||
'200':
|
||||
description: Topic tags successfully removed.
|
||||
|
||||
@@ -9,6 +9,7 @@ delete:
|
||||
type: integer
|
||||
required: true
|
||||
description: uid of the user to delete
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: user account deleted
|
||||
@@ -32,6 +33,7 @@ put:
|
||||
type: integer
|
||||
required: true
|
||||
description: uid of the user to update
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
|
||||
@@ -9,6 +9,7 @@ put:
|
||||
type: integer
|
||||
required: true
|
||||
description: uid of the user to ban
|
||||
example: 1
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -45,6 +46,7 @@ delete:
|
||||
type: integer
|
||||
required: true
|
||||
description: uid of the user to unban
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: successfully unbanned user
|
||||
|
||||
@@ -9,6 +9,7 @@ post:
|
||||
type: integer
|
||||
required: true
|
||||
description: uid of the user to follow
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: successfully followed user
|
||||
@@ -32,6 +33,7 @@ delete:
|
||||
type: integer
|
||||
required: true
|
||||
description: uid of the user to unfollow
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: successfully unfollowed user
|
||||
|
||||
@@ -9,6 +9,7 @@ put:
|
||||
type: integer
|
||||
required: true
|
||||
description: uid of the user to update
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
|
||||
@@ -9,6 +9,7 @@ put:
|
||||
type: integer
|
||||
required: true
|
||||
description: uid of the user
|
||||
example: 1
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
|
||||
@@ -26,6 +26,7 @@ delete:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid API token
|
||||
example: 6d03a630-86fd-4515-9a35-e957502f4f89
|
||||
responses:
|
||||
'200':
|
||||
description: successfully deleted user token
|
||||
|
||||
Reference in New Issue
Block a user