feat: AddUserTitle implemented
This commit is contained in:
parent
15a681c622
commit
76df4d8592
10 changed files with 749 additions and 39 deletions
|
|
@ -87,3 +87,55 @@ get:
|
|||
description: Request params are not correct
|
||||
'500':
|
||||
description: Unknown server error
|
||||
|
||||
post:
|
||||
summary: Add a title to a user
|
||||
description: User adding title to list af watched, status required
|
||||
operationId: addUserTitle
|
||||
parameters:
|
||||
- name: user_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
description: ID of the user to assign the title to
|
||||
example: 123
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../schemas/UserTitle.yaml'
|
||||
responses:
|
||||
'200':
|
||||
description: Title successfully added to user
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
# success:
|
||||
# type: boolean
|
||||
# example: true
|
||||
# error:
|
||||
# type: string
|
||||
# nullable: true
|
||||
# example: null
|
||||
data:
|
||||
$ref: '../schemas/UserTitleMini.yaml'
|
||||
# required:
|
||||
# - success
|
||||
# - error
|
||||
'400':
|
||||
description: Invalid request body (missing fields, invalid types, etc.)
|
||||
'401':
|
||||
description: Unauthorized — missing or invalid auth token
|
||||
'403':
|
||||
description: Forbidden — user not allowed to assign titles to this user
|
||||
'404':
|
||||
description: User or Title not found
|
||||
'409':
|
||||
description: Conflict — title already assigned to user (if applicable)
|
||||
'500':
|
||||
description: Internal server error
|
||||
Loading…
Add table
Add a link
Reference in a new issue