docs: openapi spec for new route

isekai-main
Julian Lam 3 years ago
parent cf88483fee
commit 9b912db71e

@ -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":

@ -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

@ -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
Loading…
Cancel
Save