1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 23:50:26 +01:00

add error handling

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-07-31 18:16:36 +09:00
parent 49b7951ba3
commit 853709bb44
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
8 changed files with 78 additions and 26 deletions

View file

@ -14,7 +14,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/FollowResponse" oneOf:
- $ref: "#/components/schemas/FollowResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"
@ -28,7 +30,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/FollowResponse" oneOf:
- $ref: "#/components/schemas/FollowResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"
@ -42,7 +46,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/FollowResponse" oneOf:
- $ref: "#/components/schemas/FollowResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"

View file

@ -14,7 +14,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/OtherResponse" oneOf:
- $ref: "#/components/schemas/OtherResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "other" - "other"

View file

@ -14,7 +14,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/FavoriteTweetResponseData" oneOf:
- $ref: "#/components/schemas/FavoriteTweetResponseData"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -28,7 +30,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/UnfavoriteTweetResponseData" oneOf:
- $ref: "#/components/schemas/UnfavoriteTweetResponseData"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -42,7 +46,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/CreateRetweetResponse" oneOf:
- $ref: "#/components/schemas/CreateRetweetResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -56,7 +62,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/DeleteRetweetResponse" oneOf:
- $ref: "#/components/schemas/DeleteRetweetResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -70,7 +78,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/CreateTweetResponse" oneOf:
- $ref: "#/components/schemas/CreateTweetResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -84,7 +94,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/DeleteTweetResponse" oneOf:
- $ref: "#/components/schemas/DeleteTweetResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"

View file

@ -14,7 +14,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/ProfileResponse" oneOf:
- $ref: "#/components/schemas/ProfileResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
components: components:
schemas: schemas:

View file

@ -14,7 +14,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/TimelineResponse" oneOf:
- $ref: "#/components/schemas/TimelineResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -28,7 +30,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/TimelineResponse" oneOf:
- $ref: "#/components/schemas/TimelineResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -42,7 +46,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/ListLatestTweetsTimelineResponse" oneOf:
- $ref: "#/components/schemas/ListLatestTweetsTimelineResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -56,7 +62,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/SearchTimelineResponse" oneOf:
- $ref: "#/components/schemas/SearchTimelineResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"

View file

@ -14,7 +14,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/TweetDetailResponse" oneOf:
- $ref: "#/components/schemas/TweetDetailResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -28,7 +30,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/TweetFavoritersResponse" oneOf:
- $ref: "#/components/schemas/TweetFavoritersResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"
@ -42,7 +46,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/TweetRetweetersResponse" oneOf:
- $ref: "#/components/schemas/TweetRetweetersResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"

View file

@ -14,7 +14,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/UserResponse" oneOf:
- $ref: "#/components/schemas/UserResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user" - "user"
@ -28,7 +30,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/UserResponse" oneOf:
- $ref: "#/components/schemas/UserResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user" - "user"
@ -42,7 +46,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/UsersResponse" oneOf:
- $ref: "#/components/schemas/UsersResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user" - "user"

View file

@ -14,7 +14,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/UserTweetsResponse" oneOf:
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -28,7 +30,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/UserTweetsResponse" oneOf:
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -42,7 +46,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/UserHighlightsTweetsResponse" oneOf:
- $ref: "#/components/schemas/UserHighlightsTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -56,7 +62,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/UserTweetsResponse" oneOf:
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -70,7 +78,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/UserTweetsResponse" oneOf:
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"