fix: API定義が間違っていたので修正2

This commit is contained in:
usbharu 2024-02-12 12:22:01 +09:00
parent 789f0c7fde
commit 01ae2268d5
1 changed files with 44 additions and 14 deletions

View File

@ -949,6 +949,9 @@ paths:
requestBody: requestBody:
required: true required: true
content: content:
application/json:
schema:
$ref: "#/components/schemas/FilterPostRequest"
application/x-www-form-urlencoded: application/x-www-form-urlencoded:
schema: schema:
$ref: "#/components/schemas/FilterPostRequest" $ref: "#/components/schemas/FilterPostRequest"
@ -1062,6 +1065,9 @@ paths:
requestBody: requestBody:
required: true required: true
content: content:
application/json:
schema:
$ref: "#/components/schemas/FilterKeywordsPostRequest"
application/x-www-form-urlencoded: application/x-www-form-urlencoded:
schema: schema:
$ref: "#/components/schemas/FilterKeywordsPostRequest" $ref: "#/components/schemas/FilterKeywordsPostRequest"
@ -1158,7 +1164,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/FilterStatus" type: array
items:
$ref: "#/components/schemas/FilterStatus"
post: post:
tags: tags:
- filter - filter
@ -1174,6 +1182,9 @@ paths:
requestBody: requestBody:
required: true required: true
content: content:
application/json:
schema:
$ref: "#/components/schemas/FilterStatusRequest"
application/x-www-form-urlencoded: application/x-www-form-urlencoded:
schema: schema:
$ref: "#/components/schemas/FilterStatusRequest" $ref: "#/components/schemas/FilterStatusRequest"
@ -1248,6 +1259,15 @@ paths:
security: security:
- OAuth2: - OAuth2:
- "write:filters" - "write:filters"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/V1FilterPostRequest"
application/x-www-form-urlencoded:
schema:
$ref: "#/components/schemas/V1FilterPostRequest"
responses: responses:
200: 200:
description: 成功 description: 成功
@ -1269,12 +1289,6 @@ paths:
required: true required: true
schema: schema:
type: string type: string
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: "#/components/schemas/V1FilterPostRequest"
responses: responses:
200: 200:
description: 成功 description: 成功
@ -1882,13 +1896,15 @@ components:
title: title:
type: string type: string
context: context:
type: string type: array
enum: items:
- home type: string
- notifications enum:
- public - home
- thread - notifications
- account - public
- thread
- account
expires_at: expires_at:
type: string type: string
nullable: true nullable: true
@ -1968,6 +1984,9 @@ components:
type: boolean type: boolean
expires_in: expires_in:
type: integer type: integer
required:
- phrase
- context
V1FilterPutRequest: V1FilterPutRequest:
type: object type: object
@ -2017,6 +2036,9 @@ components:
type: array type: array
items: items:
$ref: "#/components/schemas/FilterPostRequestKeyword" $ref: "#/components/schemas/FilterPostRequestKeyword"
required:
- title
- context
FilterPostRequestKeyword: FilterPostRequestKeyword:
type: object type: object
@ -2025,8 +2047,12 @@ components:
type: string type: string
whole_word: whole_word:
type: boolean type: boolean
default: false
regex: regex:
type: boolean type: boolean
default: false
required:
- keyword
FilterKeywordsPostRequest: FilterKeywordsPostRequest:
type: object type: object
@ -2035,8 +2061,12 @@ components:
type: string type: string
whole_word: whole_word:
type: boolean type: boolean
default: false
regex: regex:
type: boolean type: boolean
default: false
required:
- keyword
FilterKeywordsPutRequest: FilterKeywordsPutRequest:
type: object type: object