Skip to content

Commit

Permalink
fix(writeapi): more tweaks to schema files
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Oct 28, 2020
1 parent 9f9e3c1 commit b2e9e3e
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 18 deletions.
18 changes: 18 additions & 0 deletions public/openapi/write/admin/settings/setting.yaml
Expand Up @@ -11,6 +11,24 @@ put:
required: true
description: backend id of the setting to update
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:
'200':
description: Admin setting updated
Expand Down
3 changes: 1 addition & 2 deletions public/openapi/write/files.yaml
Expand Up @@ -13,10 +13,9 @@ delete:
path:
type: string
description: Path to the file (relative to the configured `upload_path`)
example: files/test.txt
required:
- path
example:
path: files/uploaded_file.jpg
responses:
'200':
description: File deleted
Expand Down
4 changes: 2 additions & 2 deletions public/openapi/write/posts/pid/bookmark.yaml
Expand Up @@ -10,7 +10,7 @@ put:
type: string
required: true
description: a valid post id
example: 1
example: 2
responses:
'200':
description: Post successfully bookmarked
Expand All @@ -36,7 +36,7 @@ delete:
type: string
required: true
description: a valid post id
example: 1
example: 2
responses:
'200':
description: Post successfully unbookmarked
Expand Down
20 changes: 10 additions & 10 deletions public/openapi/write/posts/pid/state.yaml
@@ -1,19 +1,19 @@
put:
delete:
tags:
- posts
summary: restore a post
description: This operation restores a post.
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
example: 2
responses:
'200':
description: Topic successfully restored
description: Post successfully deleted
content:
application/json:
schema:
Expand All @@ -24,22 +24,22 @@ put:
response:
type: object
properties: {}
delete:
put:
tags:
- posts
summary: deletes a post
description: This operation soft deletes a post.
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
example: 2
responses:
'200':
description: Post successfully deleted
description: Topic successfully restored
content:
application/json:
schema:
Expand Down
13 changes: 10 additions & 3 deletions public/openapi/write/posts/pid/vote.yaml
Expand Up @@ -10,7 +10,7 @@ put:
type: string
required: true
description: a valid post id
example: 1
example: 2
requestBody:
required: true
content:
Expand All @@ -21,8 +21,7 @@ put:
delta:
type: number
description: Positive integer for upvote, negative integer for downvote (0 to unvote.)
example:
delta: 1
example: 1
responses:
'200':
description: Post successfully upvoted
Expand All @@ -41,6 +40,14 @@ delete:
- posts
summary: unvote 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:
'200':
description: Post successfully unvoted
Expand Down
2 changes: 1 addition & 1 deletion public/openapi/write/topics/tid.yaml
Expand Up @@ -51,7 +51,7 @@ delete:
type: string
required: true
description: a valid topic id
example: 2
example: 3
responses:
'200':
description: Topic successfully purged
Expand Down

0 comments on commit b2e9e3e

Please sign in to comment.