1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 15:40:26 +01:00
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-04-23 03:56:57 +09:00
parent 14ecb9a5f4
commit 20816336e5
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
6 changed files with 16 additions and 2 deletions

View file

@ -122,15 +122,21 @@ components:
- retweeted
- user_id_str
- id_str
TweetTombstone:
properties:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
TweetUnion:
discriminator:
mapping":
Tweet: '#/components/schemas/Tweet'
TweetTombstone: '#/components/schemas/TweetTombstone'
TweetWithVisibilityResults: '#/components/schemas/TweetWithVisibilityResults'
propertyName: __typename
oneOf:
- $ref: '#/components/schemas/Tweet'
- $ref: '#/components/schemas/TweetWithVisibilityResults'
- $ref: '#/components/schemas/TweetTombstone'
TweetWithVisibilityResults:
properties:
__typename:

View file

@ -8,6 +8,7 @@ components:
- TimelineTimelineCursor
- TweetWithVisibilityResults
- TimelineTimelineModule
- TweetTombstone
- Tweet
- User
type: string

View file

@ -36,7 +36,6 @@ components:
required:
- __typename
- affiliates_highlighted_label
- has_graduated_access
- id
- is_blue_verified
- legacy

View file

@ -11,11 +11,13 @@ components:
oneOf:
- $ref: "#/components/schemas/Tweet"
- $ref: "#/components/schemas/TweetWithVisibilityResults"
- $ref: "#/components/schemas/TweetTombstone"
discriminator:
propertyName: __typename
mapping": # deprecated
Tweet: "#/components/schemas/Tweet"
TweetWithVisibilityResults: "#/components/schemas/TweetWithVisibilityResults"
TweetTombstone: "#/components/schemas/TweetTombstone"
TweetWithVisibilityResults:
required:
@ -27,6 +29,12 @@ components:
tweet:
$ref: "#/components/schemas/Tweet"
TweetTombstone: #remove tweet
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults
# todo
Tweet:
required:
- "rest_id"

View file

@ -15,6 +15,7 @@ components:
TimelineTimelineCursor,
TweetWithVisibilityResults,
TimelineTimelineModule,
TweetTombstone,
Tweet,
User,
]

View file

@ -23,7 +23,6 @@ components:
required:
- "__typename"
- "affiliates_highlighted_label"
- "has_graduated_access"
- "id"
- "is_blue_verified"
- "legacy"