1
0
Fork 0

add missing user update me fields in openapi spec

This commit is contained in:
Rigel Kent 2021-05-11 21:38:33 +02:00
parent bf3c3feafb
commit 77b0c6b58f
No known key found for this signature in database
GPG key ID: 5E53E96A494E452F

View file

@ -4196,20 +4196,19 @@ components:
maxLength: 36 maxLength: 36
username: username:
type: string type: string
description: The username of the user description: immutable name of the user, used to find or mention its actor
example: chocobozzz example: chocobozzz
pattern: '/^[a-z0-9._]{1,50}$/' pattern: '/^[a-z0-9._]{1,50}$/'
minLength: 1 minLength: 1
maxLength: 50 maxLength: 50
usernameChannel: usernameChannel:
type: string type: string
description: The username for the default channel description: immutable name of the channel, used to interact with its actor
example: The Capybara Channel example: The Capybara Channel
pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/' pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
password: password:
type: string type: string
format: password format: password
description: The password of the user
minLength: 6 minLength: 6
maxLength: 255 maxLength: 255
@ -5019,7 +5018,7 @@ components:
type: string type: string
format: url format: url
name: name:
description: immutable name of the actor description: immutable name of the actor, used to find or mention it
allOf: allOf:
- $ref: '#/components/schemas/username' - $ref: '#/components/schemas/username'
host: host:
@ -5055,7 +5054,9 @@ components:
- $ref: '#/components/schemas/User/properties/id' - $ref: '#/components/schemas/User/properties/id'
displayName: displayName:
type: string type: string
description: name displayed on the account's profile description: editable name of the account, displayed in its representations
minLength: 3
maxLength: 120
description: description:
type: string type: string
description: text or bio displayed on the account's profile description: text or bio displayed on the account's profile
@ -5806,9 +5807,9 @@ components:
UpdateUser: UpdateUser:
properties: properties:
email: email:
type: string
format: email
description: The updated email of the user description: The updated email of the user
allOf:
- $ref: '#/components/schemas/User/properties/email'
emailVerified: emailVerified:
type: boolean type: boolean
description: Set the email as verified description: Set the email as verified
@ -5828,28 +5829,54 @@ components:
adminFlags: adminFlags:
$ref: '#/components/schemas/UserAdminFlags' $ref: '#/components/schemas/UserAdminFlags'
UpdateMe: UpdateMe:
# see shared/models/users/user-update-me.model.ts:
properties: properties:
password: password:
$ref: '#/components/schemas/password' $ref: '#/components/schemas/password'
currentPassword:
$ref: '#/components/schemas/password'
email: email:
description: new email used for login and service communications
allOf:
- $ref: '#/components/schemas/User/properties/email'
displayName:
type: string type: string
format: email description: new name of the user in its representations
description: Your new email minLength: 3
maxLength: 120
displayNSFW: displayNSFW:
type: string type: string
description: Your new displayNSFW description: new NSFW display policy
enum: enum:
- 'true' - 'true'
- 'false' - 'false'
- both - both
webTorrentEnabled:
type: boolean
description: whether to enable P2P in the player or not
autoPlayVideo: autoPlayVideo:
type: boolean type: boolean
description: Your new autoPlayVideo description: new preference regarding playing videos automatically
required: autoPlayNextVideo:
- password type: boolean
- email description: new preference regarding playing following videos automatically
- displayNSFW autoPlayNextVideoPlaylist:
- autoPlayVideo type: boolean
description: new preference regarding playing following playlist videos automatically
videosHistoryEnabled:
type: boolean
description: whether to keep track of watched history or not
videoLanguages:
type: array
items:
type: string
description: list of languages to filter videos down to
theme:
type: string
noInstanceConfigWarningModal:
type: boolean
noWelcomeModal:
type: boolean
GetMeVideoRating: GetMeVideoRating:
properties: properties:
id: id:
@ -5881,28 +5908,28 @@ components:
RegisterUser: RegisterUser:
properties: properties:
username: username:
$ref: '#/components/schemas/username' description: immutable name of the user, used to find or mention its actor
allOf:
- $ref: '#/components/schemas/username'
password: password:
$ref: '#/components/schemas/password' $ref: '#/components/schemas/password'
email: email:
type: string type: string
format: email format: email
description: The email of the user description: email of the user, used for login or service communications
displayName: displayName:
type: string type: string
description: The user display name description: editable name of the user, displayed in its representations
minLength: 1 minLength: 1
maxLength: 120 maxLength: 120
channel: channel:
type: object type: object
description: channel base information used to create the first channel of the user
properties: properties:
name: name:
$ref: '#/components/schemas/usernameChannel' $ref: '#/components/schemas/usernameChannel'
displayName: displayName:
type: string $ref: '#/components/schemas/VideoChannel/properties/displayName'
description: The display name for the default channel
minLength: 1
maxLength: 120
required: required:
- username - username
- password - password
@ -5913,6 +5940,7 @@ components:
# GET/POST/PUT properties # GET/POST/PUT properties
displayName: displayName:
type: string type: string
description: editable name of the channel, displayed in its representations
example: Videos of Framasoft example: Videos of Framasoft
minLength: 1 minLength: 1
maxLength: 120 maxLength: 120