Merge branch 'dev' into dev-ars
All checks were successful
Build and Deploy Go App / build (push) Successful in 8m39s
Build and Deploy Go App / deploy (push) Successful in 35s

This commit is contained in:
Iron_Felix 2025-11-30 03:01:23 +03:00
commit 1308e265a6
30 changed files with 1224 additions and 896 deletions

View file

@ -0,0 +1,107 @@
get:
summary: Get user title
operationId: getUserTitle
parameters:
- in: path
name: user_id
required: true
schema:
type: integer
format: int64
- in: path
name: title_id
required: true
schema:
type: integer
format: int64
responses:
'200':
description: User titles
content:
application/json:
schema:
$ref: '../schemas/UserTitleMini.yaml'
'204':
description: No user title found
'400':
description: Request params are not correct
'404':
description: User or title not found
'500':
description: Unknown server error
patch:
summary: Update a usertitle
description: User updating title list of watched
operationId: updateUserTitle
parameters:
- in: path
name: user_id
required: true
schema:
type: integer
format: int64
- in: path
name: title_id
required: true
schema:
type: integer
format: int64
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
status:
$ref: '../schemas/enums/UserTitleStatus.yaml'
rate:
type: integer
format: int32
responses:
'200':
description: Title successfully updated
content:
application/json:
schema:
$ref: '../schemas/UserTitleMini.yaml'
'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 update title
'404':
description: User or Title not found
'500':
description: Internal server error
delete:
summary: Delete a usertitle
description: User deleting title from list of watched
operationId: deleteUserTitle
parameters:
- in: path
name: user_id
required: true
schema:
type: integer
format: int64
- in: path
name: title_id
required: true
schema:
type: integer
format: int64
responses:
'200':
description: Title successfully deleted
'401':
description: Unauthorized — missing or invalid auth token
'403':
description: Forbidden — user not allowed to delete title
'404':
description: User or Title not found
'500':
description: Internal server error

View file

@ -1,5 +1,6 @@
get:
summary: Get user titles
operationId: getUserTitles
parameters:
- $ref: '../parameters/cursor.yaml'
- $ref: "../parameters/title_sort.yaml"
@ -138,88 +139,5 @@ post:
description: User or Title not found
'409':
description: Conflict — title already assigned to user (if applicable)
'500':
description: Internal server error
patch:
summary: Update a usertitle
description: User updating title list of watched
operationId: updateUserTitle
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:
type: object
required:
- title_id
properties:
title_id:
type: integer
format: int64
status:
$ref: '../schemas/enums/UserTitleStatus.yaml'
rate:
type: integer
format: int32
responses:
'200':
description: Title successfully updated
content:
application/json:
schema:
$ref: '../schemas/UserTitleMini.yaml'
'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 update title
'404':
description: User or Title not found
'500':
description: Internal server error
delete:
summary: Delete a usertitle
description: User deleting title from list of watched
operationId: deleteUserTitle
parameters:
- name: user_id
in: path
required: true
schema:
type: integer
format: int64
description: ID of the user to assign the title to
- in: query
name: title_id
required: true
schema:
type: integer
format: int64
responses:
'200':
description: Title successfully deleted
# '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 delete title
'404':
description: User or Title not found
'500':
description: Internal server error