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

add UserUnavailable #28

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-08-06 19:44:19 +09:00
parent a865bbaa09
commit f54325771a
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
2 changed files with 22 additions and 1 deletions

View file

@ -20,4 +20,5 @@ components:
TimelineMessagePrompt,
Tweet,
User,
UserUnavailable,
]

View file

@ -17,7 +17,17 @@ components:
- "result"
properties:
result:
$ref: "#/components/schemas/User"
$ref: "#/components/schemas/UserUnion"
UserUnion:
oneOf:
- $ref: "#/components/schemas/User"
- $ref: "#/components/schemas/UserUnavailable"
discriminator:
propertyName: __typename
mapping": # deprecated
User: "#/components/schemas/User"
UserUnavailable: "#/components/schemas/UserUnavailable"
User:
required:
@ -211,3 +221,13 @@ components:
want_retweets:
type: boolean
default: false
UserUnavailable:
required:
- "__typename"
- "reason"
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # UserUnavailable
reason:
type: string