Update API documentation for accounts and config (#2072)
* Update Actor and Account schemas * Fix mixed up paramaters for /accounts * Update ServerConfig schema * Add ServerConfigAbout and ServerConfigCustom schemas
This commit is contained in:
parent
d636ab58d0
commit
2a8ae7595c
1 changed files with 308 additions and 5 deletions
|
@ -130,9 +130,6 @@ paths:
|
||||||
summary: Get the account by name
|
summary: Get the account by name
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/name'
|
- $ref: '#/components/parameters/name'
|
||||||
- $ref: '#/components/parameters/start'
|
|
||||||
- $ref: '#/components/parameters/count'
|
|
||||||
- $ref: '#/components/parameters/sort'
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
|
@ -204,6 +201,10 @@ paths:
|
||||||
tags:
|
tags:
|
||||||
- Accounts
|
- Accounts
|
||||||
summary: Get all accounts
|
summary: Get all accounts
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/start'
|
||||||
|
- $ref: '#/components/parameters/count'
|
||||||
|
- $ref: '#/components/parameters/sort'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
|
@ -233,6 +234,10 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ServerConfigAbout'
|
||||||
/config/custom:
|
/config/custom:
|
||||||
get:
|
get:
|
||||||
summary: Get the runtime configuration of the server
|
summary: Get the runtime configuration of the server
|
||||||
|
@ -244,6 +249,10 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ServerConfigCustom'
|
||||||
put:
|
put:
|
||||||
summary: Set the runtime configuration of the server
|
summary: Set the runtime configuration of the server
|
||||||
tags:
|
tags:
|
||||||
|
@ -2254,8 +2263,6 @@ components:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: number
|
type: number
|
||||||
uuid:
|
|
||||||
type: string
|
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
|
@ -2276,8 +2283,12 @@ components:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Actor'
|
- $ref: '#/components/schemas/Actor'
|
||||||
- properties:
|
- properties:
|
||||||
|
userId:
|
||||||
|
type: string
|
||||||
displayName:
|
displayName:
|
||||||
type: string
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
User:
|
User:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
|
@ -2321,18 +2332,102 @@ components:
|
||||||
type: number
|
type: number
|
||||||
ServerConfig:
|
ServerConfig:
|
||||||
properties:
|
properties:
|
||||||
|
instance:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
shortDescription:
|
||||||
|
type: string
|
||||||
|
defaultClientRoute:
|
||||||
|
type: string
|
||||||
|
isNSFW:
|
||||||
|
type: boolean
|
||||||
|
defaultNSFWPolicy:
|
||||||
|
type: string
|
||||||
|
customizations:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
javascript:
|
||||||
|
type: string
|
||||||
|
css:
|
||||||
|
type: string
|
||||||
|
plugin:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
registered:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
theme:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
registered:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
contactForm:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
serverVersion:
|
||||||
|
type: string
|
||||||
|
serverCommit:
|
||||||
|
type: string
|
||||||
signup:
|
signup:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
allowed:
|
allowed:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
allowedForCurrentIP:
|
||||||
|
type: boolean
|
||||||
|
requiresEmailVerification:
|
||||||
|
type: boolean
|
||||||
transcoding:
|
transcoding:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
hls:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
enabledResolutions:
|
enabledResolutions:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: number
|
type: number
|
||||||
|
import:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
videos:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
http:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
torrent:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
autoBlacklist:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
videos:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
ofUsers:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
avatar:
|
avatar:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -2351,6 +2446,18 @@ components:
|
||||||
video:
|
video:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
image:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
extensions:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
size:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
max:
|
||||||
|
type: number
|
||||||
file:
|
file:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -2358,6 +2465,202 @@ components:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
videoCaption:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
file:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
size:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
max:
|
||||||
|
type: number
|
||||||
|
extensions:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
user:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
videoQuota:
|
||||||
|
type: number
|
||||||
|
videoQuotaDaily:
|
||||||
|
type: number
|
||||||
|
trending:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
videos:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
intervalDays:
|
||||||
|
type: number
|
||||||
|
tracker:
|
||||||
|
ype: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
ServerConfigAbout:
|
||||||
|
properties:
|
||||||
|
instance:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
shortDescription:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
terms:
|
||||||
|
type: string
|
||||||
|
ServerConfigCustom:
|
||||||
|
properties:
|
||||||
|
instance:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
shortDescription:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
terms:
|
||||||
|
type: string
|
||||||
|
defaultClientRoute:
|
||||||
|
type: string
|
||||||
|
isNSFW:
|
||||||
|
type: boolean
|
||||||
|
defaultNSFWPolicy:
|
||||||
|
type: string
|
||||||
|
customizations:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
javascript:
|
||||||
|
type: string
|
||||||
|
css:
|
||||||
|
type: string
|
||||||
|
theme:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
default:
|
||||||
|
type: string
|
||||||
|
services:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
twitter:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
whitelisted:
|
||||||
|
type: boolean
|
||||||
|
cache:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
previews:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
size:
|
||||||
|
type: number
|
||||||
|
captions:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
size:
|
||||||
|
type: number
|
||||||
|
signup:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
limit:
|
||||||
|
type: number
|
||||||
|
requiresEmailVerification:
|
||||||
|
type: boolean
|
||||||
|
admin:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
contactForm:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
user:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
videoQuota:
|
||||||
|
type: number
|
||||||
|
videoQuotaDaily:
|
||||||
|
type: number
|
||||||
|
transcoding:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
allowAdditionalExtensions:
|
||||||
|
type: boolean
|
||||||
|
allowAudioFiles:
|
||||||
|
type: boolean
|
||||||
|
threads:
|
||||||
|
type: number
|
||||||
|
resolutions:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
240p:
|
||||||
|
type: boolean
|
||||||
|
360p:
|
||||||
|
type: boolean
|
||||||
|
480p:
|
||||||
|
type: boolean
|
||||||
|
720p:
|
||||||
|
type: boolean
|
||||||
|
1080p:
|
||||||
|
type: boolean
|
||||||
|
2160p:
|
||||||
|
type: boolean
|
||||||
|
hls:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
import:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
videos:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
http:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
torrent:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
autoBlacklist:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
videos:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
ofUsers:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
followers:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
instance:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
manualApproval:
|
||||||
|
type: boolean
|
||||||
Follow:
|
Follow:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
|
|
Loading…
Reference in a new issue