feat: get user titles described
This commit is contained in:
parent
8deba7afd9
commit
09d0d1eb4d
5 changed files with 461 additions and 124 deletions
|
|
@ -7,7 +7,7 @@ servers:
|
|||
- url: /api/v1
|
||||
|
||||
paths:
|
||||
/title:
|
||||
/titles:
|
||||
get:
|
||||
summary: Get titles
|
||||
parameters:
|
||||
|
|
@ -66,7 +66,7 @@ paths:
|
|||
'500':
|
||||
description: Unknown server error
|
||||
|
||||
/title/{title_id}:
|
||||
/titles/{title_id}:
|
||||
get:
|
||||
summary: Get title description
|
||||
parameters:
|
||||
|
|
@ -126,7 +126,7 @@ paths:
|
|||
# user_json:
|
||||
# $ref: '#/components/schemas/User'
|
||||
|
||||
# /title/{title_id}/reviews:
|
||||
# /titles/{title_id}/reviews:
|
||||
# get:
|
||||
# summary: Get title reviews
|
||||
# parameters:
|
||||
|
|
@ -278,45 +278,50 @@ paths:
|
|||
# user_json:
|
||||
# $ref: '#/components/schemas/User'
|
||||
|
||||
# /users/{user_id}/titles:
|
||||
# get:
|
||||
# summary: Get user titles
|
||||
# parameters:
|
||||
# - in: path
|
||||
# name: user_id
|
||||
# required: true
|
||||
# schema:
|
||||
# type: string
|
||||
# - in: query
|
||||
# name: query
|
||||
# schema:
|
||||
# type: string
|
||||
# - in: query
|
||||
# name: limit
|
||||
# schema:
|
||||
# type: integer
|
||||
# default: 10
|
||||
# - in: query
|
||||
# name: offset
|
||||
# schema:
|
||||
# type: integer
|
||||
# default: 0
|
||||
# - in: query
|
||||
# name: fields
|
||||
# schema:
|
||||
# type: string
|
||||
# default: all
|
||||
# responses:
|
||||
# '200':
|
||||
# description: List of user titles
|
||||
# content:
|
||||
# application/json:
|
||||
# schema:
|
||||
# type: array
|
||||
# items:
|
||||
# $ref: '#/components/schemas/UserTitle'
|
||||
# '204':
|
||||
# description: No titles found
|
||||
/users/{user_id}/titles/:
|
||||
get:
|
||||
summary: Get user titles
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/cursor'
|
||||
- in: path
|
||||
name: user_id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: query
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: limit
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
- in: query
|
||||
name: offset
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: fields
|
||||
schema:
|
||||
type: string
|
||||
default: all
|
||||
responses:
|
||||
'200':
|
||||
description: List of user titles
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/UserTitle'
|
||||
'204':
|
||||
description: No titles found
|
||||
'400':
|
||||
description: Request params are not correct
|
||||
'500':
|
||||
description: Unknown server error
|
||||
|
||||
# post:
|
||||
# summary: Add user title
|
||||
|
|
@ -571,6 +576,14 @@ paths:
|
|||
# type: string
|
||||
|
||||
components:
|
||||
parameters:
|
||||
cursor:
|
||||
in: query
|
||||
name: cursor
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
|
||||
schemas:
|
||||
Image:
|
||||
type: object
|
||||
|
|
@ -769,7 +782,7 @@ components:
|
|||
type: integer
|
||||
format: int64
|
||||
status:
|
||||
$ref: '#components/schemas/UserTitleStatus'
|
||||
$ref: '#/components/schemas/UserTitleStatus'
|
||||
rate:
|
||||
type: integer
|
||||
format: int32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue