Skip to content

Node.js based forum software built for the modern web

docs: openapi spec for new route

Julian Lam9b912db71e3b
diff --git a/public/openapi/read.yaml b/public/openapi/read.yaml
index a00a5bb27d..31b446d351 100644
--- a/public/openapi/read.yaml
+++ b/public/openapi/read.yaml
@@ -278,6 +278,8 @@ paths:
$ref: 'read/user/userslug/topics.yaml'
"/api/user/{userslug}/best":
$ref: 'read/user/userslug/best.yaml'
+ "/api/user/{userslug}/controversial":
+ $ref: 'read/user/userslug/controversial.yaml'
"/api/user/{userslug}/groups":
$ref: 'read/user/userslug/groups.yaml'
"/api/user/{userslug}/bookmarks":
diff --git a/public/openapi/read/user/userslug/best.yaml b/public/openapi/read/user/userslug/best.yaml
index ce4a8ffbd2..657e54fdeb 100644
--- a/public/openapi/read/user/userslug/best.yaml
+++ b/public/openapi/read/user/userslug/best.yaml
@@ -1,7 +1,7 @@
get:
tags:
- users
- summary: Get a user's best performing topics
+ summary: Get a user's best performing posts
parameters:
- name: userslug
in: path
diff --git a/public/openapi/read/user/userslug/controversial.yaml b/public/openapi/read/user/userslug/controversial.yaml
new file mode 100644
index 0000000000..c5a7fa2791
--- /dev/null
+++ b/public/openapi/read/user/userslug/controversial.yaml
@@ -0,0 +1,45 @@
+get:
+ tags:
+ - users
+ summary: Get a user's worse performing posts ("controversial")
+ parameters:
+ - name: userslug
+ in: path
+ required: true
+ schema:
+ type: string
+ example: admin
+ responses:
+ "200":
+ description: ""
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
+ - type: object
+ properties:
+ posts:
+ $ref: ../../../components/schemas/PostsObject.yaml#/PostsObject
+ nextStart:
+ type: number
+ noItemsFoundKey:
+ type: string
+ title:
+ type: string
+ showSort:
+ type: boolean
+ sortOptions:
+ type: array
+ items:
+ type: object
+ properties:
+ url:
+ type: string
+ name:
+ type: string
+ selected:
+ type: boolean
+ - $ref: ../../../components/schemas/Pagination.yaml#/Pagination
+ - $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps
\ No newline at end of file