Node.js based forum software built for the modern web
fix(writeapi): more tweaks to schema files
Julian Lamb2e9e3e0487e
diff --git a/public/openapi/write/admin/settings/setting.yaml b/public/openapi/write/admin/settings/setting.yamlindex a0de3e0644..dcd85aed56 100644--- a/public/openapi/write/admin/settings/setting.yaml+++ b/public/openapi/write/admin/settings/setting.yaml@@ -11,6 +11,24 @@ put:required: truedescription: backend id of the setting to updateexample: 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: 2responses:'200':description: Admin setting updateddiff --git a/public/openapi/write/files.yaml b/public/openapi/write/files.yamlindex b4cbaabbaf..23c497db38 100644--- a/public/openapi/write/files.yaml+++ b/public/openapi/write/files.yaml@@ -13,10 +13,9 @@ delete:path:type: stringdescription: Path to the file (relative to the configured `upload_path`)+ example: files/test.txtrequired:- path- example:- path: files/uploaded_file.jpgresponses:'200':description: File deleteddiff --git a/public/openapi/write/posts/pid/bookmark.yaml b/public/openapi/write/posts/pid/bookmark.yamlindex fe57ccf89b..2ebce0e2ff 100644--- a/public/openapi/write/posts/pid/bookmark.yaml+++ b/public/openapi/write/posts/pid/bookmark.yaml@@ -10,7 +10,7 @@ put:type: stringrequired: truedescription: a valid post id- example: 1+ example: 2responses:'200':description: Post successfully bookmarked@@ -36,7 +36,7 @@ delete:type: stringrequired: truedescription: a valid post id- example: 1+ example: 2responses:'200':description: Post successfully unbookmarkeddiff --git a/public/openapi/write/posts/pid/state.yaml b/public/openapi/write/posts/pid/state.yamlindex f9e9ce8c12..6403b74860 100644--- a/public/openapi/write/posts/pid/state.yaml+++ b/public/openapi/write/posts/pid/state.yaml@@ -1,8 +1,8 @@-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: pathname: pid@@ -10,10 +10,10 @@ put:type: stringrequired: truedescription: a valid post id- example: 1+ example: 2responses:'200':- description: Topic successfully restored+ description: Post successfully deletedcontent:application/json:schema:@@ -24,11 +24,11 @@ put:response:type: objectproperties: {}-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: pathname: pid@@ -36,10 +36,10 @@ delete:type: stringrequired: truedescription: a valid post id- example: 1+ example: 2responses:'200':- description: Post successfully deleted+ description: Topic successfully restoredcontent:application/json:schema:diff --git a/public/openapi/write/posts/pid/vote.yaml b/public/openapi/write/posts/pid/vote.yamlindex 5d2fd6c2f3..0cdb895a81 100644--- a/public/openapi/write/posts/pid/vote.yaml+++ b/public/openapi/write/posts/pid/vote.yaml@@ -10,7 +10,7 @@ put:type: stringrequired: truedescription: a valid post id- example: 1+ example: 2requestBody:required: truecontent:@@ -21,8 +21,7 @@ put:delta:type: numberdescription: Positive integer for upvote, negative integer for downvote (0 to unvote.)- example:- delta: 1+ example: 1responses:'200':description: Post successfully upvoted@@ -41,6 +40,14 @@ delete:- postssummary: unvote a postdescription: 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: 2responses:'200':description: Post successfully unvoteddiff --git a/public/openapi/write/topics/tid.yaml b/public/openapi/write/topics/tid.yamlindex adc5e02fe0..04a5e98aee 100644--- a/public/openapi/write/topics/tid.yaml+++ b/public/openapi/write/topics/tid.yaml@@ -51,7 +51,7 @@ delete:type: stringrequired: truedescription: a valid topic id- example: 2+ example: 3responses:'200':description: Topic successfully purged