mirror of https://github.com/usbharu/Hideout.git
feat: Mastodon互換APIのバリデーションを追加
This commit is contained in:
parent
6603312021
commit
56a7e9c891
|
@ -1358,6 +1358,7 @@ components:
|
||||||
format: binary
|
format: binary
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 4000
|
||||||
focus:
|
focus:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
|
@ -1369,13 +1370,17 @@ components:
|
||||||
username:
|
username:
|
||||||
type: string
|
type: string
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
maxLength: 300
|
||||||
pattern: '^[a-zA-Z0-9_-]{1,300}$'
|
pattern: '^[a-zA-Z0-9_-]{1,300}$'
|
||||||
email:
|
email:
|
||||||
type: string
|
type: string
|
||||||
|
format: email
|
||||||
password:
|
password:
|
||||||
type: string
|
type: string
|
||||||
|
format: password
|
||||||
agreement:
|
agreement:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
default: false
|
||||||
locale:
|
locale:
|
||||||
type: boolean
|
type: boolean
|
||||||
reason:
|
reason:
|
||||||
|
@ -1975,8 +1980,10 @@ components:
|
||||||
properties:
|
properties:
|
||||||
phrase:
|
phrase:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 1000
|
||||||
context:
|
context:
|
||||||
type: array
|
type: array
|
||||||
|
maxItems: 10
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
@ -1987,8 +1994,10 @@ components:
|
||||||
- account
|
- account
|
||||||
irreversible:
|
irreversible:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
default: false
|
||||||
whole_word:
|
whole_word:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
default: false
|
||||||
expires_in:
|
expires_in:
|
||||||
type: integer
|
type: integer
|
||||||
required:
|
required:
|
||||||
|
@ -2000,8 +2009,10 @@ components:
|
||||||
properties:
|
properties:
|
||||||
phrase:
|
phrase:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 1000
|
||||||
context:
|
context:
|
||||||
type: array
|
type: array
|
||||||
|
maxItems: 10
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
@ -2022,8 +2033,10 @@ components:
|
||||||
properties:
|
properties:
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 255
|
||||||
context:
|
context:
|
||||||
type: array
|
type: array
|
||||||
|
maxItems: 10
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
@ -2040,6 +2053,7 @@ components:
|
||||||
expires_in:
|
expires_in:
|
||||||
type: integer
|
type: integer
|
||||||
keywords_attributes:
|
keywords_attributes:
|
||||||
|
maxItems: 1000
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/FilterPostRequestKeyword"
|
$ref: "#/components/schemas/FilterPostRequestKeyword"
|
||||||
|
@ -2052,6 +2066,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
keyword:
|
keyword:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 1000
|
||||||
whole_word:
|
whole_word:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
@ -2066,6 +2081,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
keyword:
|
keyword:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 1000
|
||||||
whole_word:
|
whole_word:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
@ -2080,6 +2096,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
keyword:
|
keyword:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 1000
|
||||||
whole_word:
|
whole_word:
|
||||||
type: boolean
|
type: boolean
|
||||||
regex:
|
regex:
|
||||||
|
@ -2090,8 +2107,10 @@ components:
|
||||||
properties:
|
properties:
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 255
|
||||||
context:
|
context:
|
||||||
type: array
|
type: array
|
||||||
|
maxItems: 10
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
@ -2108,6 +2127,7 @@ components:
|
||||||
expires_in:
|
expires_in:
|
||||||
type: integer
|
type: integer
|
||||||
keywords_attributes:
|
keywords_attributes:
|
||||||
|
maxItems: 1000
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/FilterPubRequestKeyword"
|
$ref: "#/components/schemas/FilterPubRequestKeyword"
|
||||||
|
@ -2117,6 +2137,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
keyword:
|
keyword:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 1000
|
||||||
whole_word:
|
whole_word:
|
||||||
type: boolean
|
type: boolean
|
||||||
regex:
|
regex:
|
||||||
|
@ -2125,6 +2146,9 @@ components:
|
||||||
type: string
|
type: string
|
||||||
_destroy:
|
_destroy:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
default: false
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
|
||||||
FilterStatusRequest:
|
FilterStatusRequest:
|
||||||
type: object
|
type: object
|
||||||
|
@ -2480,18 +2504,22 @@ components:
|
||||||
status:
|
status:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
maxLength: 3000
|
||||||
media_ids:
|
media_ids:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
maxItems: 4
|
||||||
poll:
|
poll:
|
||||||
$ref: "#/components/schemas/StatusesRequestPoll"
|
$ref: "#/components/schemas/StatusesRequestPoll"
|
||||||
in_reply_to_id:
|
in_reply_to_id:
|
||||||
type: string
|
type: string
|
||||||
sensitive:
|
sensitive:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
default: false
|
||||||
spoiler_text:
|
spoiler_text:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 100
|
||||||
visibility:
|
visibility:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
@ -2501,22 +2529,29 @@ components:
|
||||||
- direct
|
- direct
|
||||||
language:
|
language:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 100
|
||||||
scheduled_at:
|
scheduled_at:
|
||||||
type: string
|
type: string
|
||||||
|
format: date-time
|
||||||
|
example: "2019-12-05T12:33:01.000Z"
|
||||||
|
|
||||||
StatusesRequestPoll:
|
StatusesRequestPoll:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
options:
|
options:
|
||||||
type: array
|
type: array
|
||||||
|
maxItems: 10
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 100
|
||||||
expires_in:
|
expires_in:
|
||||||
type: integer
|
type: integer
|
||||||
multiple:
|
multiple:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
default: false
|
||||||
hide_totals:
|
hide_totals:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
Application:
|
Application:
|
||||||
type: object
|
type: object
|
||||||
|
@ -2543,12 +2578,16 @@ components:
|
||||||
properties:
|
properties:
|
||||||
client_name:
|
client_name:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 200
|
||||||
redirect_uris:
|
redirect_uris:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 1000
|
||||||
scopes:
|
scopes:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 1000
|
||||||
website:
|
website:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 1000
|
||||||
required:
|
required:
|
||||||
- client_name
|
- client_name
|
||||||
- redirect_uris
|
- redirect_uris
|
||||||
|
@ -2609,16 +2648,20 @@ components:
|
||||||
default: false
|
default: false
|
||||||
languages:
|
languages:
|
||||||
type: array
|
type: array
|
||||||
|
maxItems: 10
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 10
|
||||||
|
|
||||||
UpdateCredentials:
|
UpdateCredentials:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
display_name:
|
display_name:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 300
|
||||||
note:
|
note:
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 2000
|
||||||
avatar:
|
avatar:
|
||||||
type: string
|
type: string
|
||||||
format: binary
|
format: binary
|
||||||
|
|
Loading…
Reference in New Issue