fix(api): add missing user settings' api docs (#1820)

This PR adds new fields to the UserSettings schema, including username, email, discordId, and various quota limits for movies and TV shows.

It also updates API paths to reference the new UserSettings schema.
This commit is contained in:
0xsysr3ll
2025-07-30 23:44:49 +02:00
committed by GitHub
parent e98f31e66c
commit e52c63164f

View File

@@ -141,14 +141,82 @@ components:
UserSettings: UserSettings:
type: object type: object
properties: properties:
username:
type: string
example: 'Mr User'
email:
type: string
example: 'user@example.com'
discordId:
type: string
nullable: true
example: '123456789'
locale: locale:
type: string type: string
nullable: true
example: 'en'
discoverRegion: discoverRegion:
type: string type: string
originalLanguage: nullable: true
type: string example: 'US'
streamingRegion: streamingRegion:
type: string type: string
nullable: true
example: 'US'
originalLanguage:
type: string
nullable: true
example: 'en'
movieQuotaLimit:
type: number
nullable: true
description: 'Maximum number of movie requests allowed'
example: 10
movieQuotaDays:
type: number
nullable: true
description: 'Time period in days for movie quota'
example: 30
tvQuotaLimit:
type: number
nullable: true
description: 'Maximum number of TV requests allowed'
example: 5
tvQuotaDays:
type: number
nullable: true
description: 'Time period in days for TV quota'
example: 14
globalMovieQuotaDays:
type: number
nullable: true
description: 'Global movie quota days setting'
example: 30
globalMovieQuotaLimit:
type: number
nullable: true
description: 'Global movie quota limit setting'
example: 10
globalTvQuotaLimit:
type: number
nullable: true
description: 'Global TV quota limit setting'
example: 5
globalTvQuotaDays:
type: number
nullable: true
description: 'Global TV quota days setting'
example: 14
watchlistSyncMovies:
type: boolean
nullable: true
description: 'Enable watchlist sync for movies'
example: true
watchlistSyncTv:
type: boolean
nullable: true
description: 'Enable watchlist sync for TV'
example: false
MainSettings: MainSettings:
type: object type: object
properties: properties:
@@ -4469,11 +4537,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: '#/components/schemas/UserSettings'
properties:
username:
type: string
example: 'Mr User'
post: post:
summary: Update general settings for a user summary: Update general settings for a user
description: Updates and returns general settings for a specific user. Requires `MANAGE_USERS` permission if editing other users. description: Updates and returns general settings for a specific user. Requires `MANAGE_USERS` permission if editing other users.
@@ -4490,22 +4554,14 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: '#/components/schemas/UserSettings'
properties:
username:
type: string
nullable: true
responses: responses:
'200': '200':
description: Updated user general settings returned description: Updated user general settings returned
content: content:
application/json: application/json:
schema: schema:
type: object $ref: '#/components/schemas/UserSettings'
properties:
username:
type: string
example: 'Mr User'
/user/{userId}/settings/password: /user/{userId}/settings/password:
get: get:
summary: Get password page informatiom summary: Get password page informatiom