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

Merge branch 'main' into dev

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2024-11-07 22:23:38 +09:00
commit e7bbba9fb8
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
21 changed files with 410 additions and 7166 deletions

View file

@ -4,7 +4,7 @@
"yaml.validate": true, "yaml.validate": true,
"yaml.hover": true, "yaml.hover": true,
"yaml.schemas": { "yaml.schemas": {
"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.json": "src/**/*.yaml" "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/refs/heads/main/schemas/v3.0/schema.yaml": "src/**/*.yaml"
}, },
"[json]": { "[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"

15
.vscode/tasks.json vendored
View file

@ -4,6 +4,14 @@
{ {
"label": "build-task", "label": "build-task",
"type": "shell", "type": "shell",
"osx": {
"command": [
"source .venv/bin/activate;",
"python3 tools/build.py;",
"java -jar openapi-generator-cli.jar generate -c test/python/openapi-generator-config.yaml -g python;",
"python3 -m pip install ./python_generated;"
]
},
"linux": { "linux": {
"command": [ "command": [
"source .venv/bin/activate;", "source .venv/bin/activate;",
@ -27,6 +35,13 @@
"runOptions": { "runOptions": {
"runOn": "folderOpen" "runOn": "folderOpen"
}, },
"osx": {
"command": [
"python3.10 -m venv .venv;",
".venv/bin/python3 -m pip install -r requirements.txt;",
"curl https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.0.jar -o openapi-generator-cli.jar;"
]
},
"linux": { "linux": {
"command": [ "command": [
"python3 -m venv .venv;", "python3 -m venv .venv;",

View file

@ -15,8 +15,9 @@ Twitter OpenAPI(Swagger) specification
openapi-generator-cli generate -g <language> -i https://raw.githubusercontent.com/fa0311/twitter-openapi/main/dist/docs/openapi-3.0.yaml -o ./generated openapi-generator-cli generate -g <language> -i https://raw.githubusercontent.com/fa0311/twitter-openapi/main/dist/docs/openapi-3.0.yaml -o ./generated
``` ```
There are several outputs, but the one that best follows the OpenAPI specification is `dist/docs`. There are several outputs, but the one that most closely follows the OpenAPI specification is `dist/docs`.
However, some Generators may use a syntax that is not supported. However, a lot of syntax that is not supported by some generators is used.
You can also modify the hook to make the generated results more user-friendly. [build_config.py](./tools/build_config.py) You can also modify the hook to make the generated results more user-friendly. [build_config.py](./tools/build_config.py)
Note that the license also inherits to the output. Note that the license also inherits to the output.

View file

@ -266,14 +266,14 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/BookmarksResponseData' $ref: '#/components/schemas/BookmarksResponseData'
required: errors:
- data items:
$ref: '#/components/schemas/Error'
type: array
BookmarksResponseData: BookmarksResponseData:
properties: properties:
bookmark_timeline_v2: bookmark_timeline_v2:
$ref: '#/components/schemas/BookmarksTimeline' $ref: '#/components/schemas/BookmarksTimeline'
required:
- bookmark_timeline_v2
BookmarksTimeline: BookmarksTimeline:
properties: properties:
timeline: timeline:
@ -577,14 +577,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/CreateBookmarkResponseData' $ref: '#/components/schemas/CreateBookmarkResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
CreateBookmarkResponseData: CreateBookmarkResponseData:
properties: properties:
tweet_bookmark_put: tweet_bookmark_put:
type: string type: string
required:
- tweet_bookmark_put
CreateRetweet: CreateRetweet:
properties: properties:
result: result:
@ -595,14 +597,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/CreateRetweetResponseData' $ref: '#/components/schemas/CreateRetweetResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
CreateRetweetResponseData: CreateRetweetResponseData:
properties: properties:
create_retweet: create_retweet:
$ref: '#/components/schemas/CreateRetweetResponseResult' $ref: '#/components/schemas/CreateRetweetResponseResult'
required:
- create_retweet
CreateRetweetResponseResult: CreateRetweetResponseResult:
properties: properties:
retweet_results: retweet_results:
@ -619,14 +623,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/CreateTweetResponseData' $ref: '#/components/schemas/CreateTweetResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
CreateTweetResponseData: CreateTweetResponseData:
properties: properties:
create_tweet: create_tweet:
$ref: '#/components/schemas/CreateTweetResponseResult' $ref: '#/components/schemas/CreateTweetResponseResult'
required:
- create_tweet
CreateTweetResponseResult: CreateTweetResponseResult:
properties: properties:
tweet_results: tweet_results:
@ -654,14 +660,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/DeleteBookmarkResponseData' $ref: '#/components/schemas/DeleteBookmarkResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
DeleteBookmarkResponseData: DeleteBookmarkResponseData:
properties: properties:
tweet_bookmark_delete: tweet_bookmark_delete:
type: string type: string
required:
- tweet_bookmark_delete
DeleteRetweet: DeleteRetweet:
properties: properties:
result: result:
@ -674,14 +682,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/DeleteRetweetResponseData' $ref: '#/components/schemas/DeleteRetweetResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
DeleteRetweetResponseData: DeleteRetweetResponseData:
properties: properties:
create_retweet: create_retweet:
$ref: '#/components/schemas/CreateRetweetResponseResult' $ref: '#/components/schemas/DeleteRetweetResponseResult'
required:
- unretweet
DeleteRetweetResponseResult: DeleteRetweetResponseResult:
properties: properties:
retweet_results: retweet_results:
@ -692,14 +702,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/DeleteTweetResponseData' $ref: '#/components/schemas/DeleteTweetResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
DeleteTweetResponseData: DeleteTweetResponseData:
properties: properties:
delete_retweet: delete_retweet:
$ref: '#/components/schemas/DeleteTweetResponseResult' $ref: '#/components/schemas/DeleteTweetResponseResult'
required:
- delete_tweet
DeleteTweetResponseResult: DeleteTweetResponseResult:
properties: properties:
tweet_results: tweet_results:
@ -811,23 +823,6 @@ components:
- kind - kind
- tracing - tracing
type: object type: object
Errors:
properties:
data:
$ref: '#/components/schemas/ErrorsData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required:
- errors
type: object
ErrorsData:
properties:
user:
pattern: dummy
type: string
type: object
ExtMediaAvailability: ExtMediaAvailability:
properties: properties:
reason: reason:
@ -849,12 +844,14 @@ components:
properties: properties:
favorite_tweet: favorite_tweet:
type: string type: string
required: FavoriteTweetResponse:
- favorite_tweet
FavoriteTweetResponseData:
properties: properties:
data: data:
$ref: '#/components/schemas/FavoriteTweet' $ref: '#/components/schemas/FavoriteTweet'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
FeedbackInfo: FeedbackInfo:
@ -869,14 +866,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/FollowResponseData' $ref: '#/components/schemas/FollowResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
FollowResponseData: FollowResponseData:
properties: properties:
user: user:
$ref: '#/components/schemas/FollowResponseUser' $ref: '#/components/schemas/FollowResponseUser'
required:
- user
FollowResponseResult: FollowResponseResult:
properties: properties:
__typename: __typename:
@ -920,8 +919,6 @@ components:
properties: properties:
home: home:
$ref: '#/components/schemas/HomeTimelineHome' $ref: '#/components/schemas/HomeTimelineHome'
required:
- home
InstructionType: InstructionType:
enum: enum:
- TimelineAddEntries - TimelineAddEntries
@ -981,6 +978,10 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/ListTweetsTimelineData' $ref: '#/components/schemas/ListTweetsTimelineData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
ListTweetsTimeline: ListTweetsTimeline:
@ -991,8 +992,6 @@ components:
properties: properties:
list: list:
$ref: '#/components/schemas/ListTweetsTimelineList' $ref: '#/components/schemas/ListTweetsTimelineList'
required:
- list
ListTweetsTimelineList: ListTweetsTimelineList:
properties: properties:
tweets_timeline: tweets_timeline:
@ -1368,7 +1367,7 @@ components:
required: required:
- fetchStatus - fetchStatus
type: object type: object
OtherResponse: OtherObjectAll:
properties: properties:
Session: Session:
$ref: '#/components/schemas/Session' $ref: '#/components/schemas/Session'
@ -1387,14 +1386,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/ProfileResponseData' $ref: '#/components/schemas/ProfileResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
ProfileResponseData: ProfileResponseData:
properties: properties:
user_result_by_screen_name: user_result_by_screen_name:
$ref: '#/components/schemas/UserResultByScreenName' $ref: '#/components/schemas/UserResultByScreenName'
required:
- user_result_by_screen_name
QuotedRefResult: QuotedRefResult:
properties: properties:
result: result:
@ -1445,12 +1446,14 @@ components:
properties: properties:
search_by_raw_query: search_by_raw_query:
$ref: '#/components/schemas/SearchByRawQuery' $ref: '#/components/schemas/SearchByRawQuery'
required:
- search_by_raw_query
SearchTimelineResponse: SearchTimelineResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/SearchTimelineData' $ref: '#/components/schemas/SearchTimelineData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
SelfThread: SelfThread:
@ -1468,10 +1471,6 @@ components:
type: boolean type: boolean
other: other:
type: boolean type: boolean
required:
- adult_content
- graphic_violence
- other
Session: Session:
properties: properties:
SsoInitTokens: SsoInitTokens:
@ -1800,6 +1799,10 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/HomeTimelineResponseData' $ref: '#/components/schemas/HomeTimelineResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TimelineShowAlert: TimelineShowAlert:
@ -2199,14 +2202,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/TweetDetailResponseData' $ref: '#/components/schemas/TweetDetailResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TweetDetailResponseData: TweetDetailResponseData:
properties: properties:
threaded_conversation_with_injections_v2: threaded_conversation_with_injections_v2:
$ref: '#/components/schemas/Timeline' $ref: '#/components/schemas/Timeline'
required:
- threaded_conversation_with_injections_v2
TweetEditControl: TweetEditControl:
properties: properties:
edit_control_initial: edit_control_initial:
@ -2257,14 +2262,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/TweetFavoritersResponseData' $ref: '#/components/schemas/TweetFavoritersResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TweetFavoritersResponseData: TweetFavoritersResponseData:
properties: properties:
favoriters_timeline: favoriters_timeline:
$ref: '#/components/schemas/TimelineV2' $ref: '#/components/schemas/TimelineV2'
required:
- favoriters_timeline
TweetInterstitial: TweetInterstitial:
properties: properties:
__typename: __typename:
@ -2464,26 +2471,30 @@ components:
properties: properties:
tweetResult: tweetResult:
$ref: '#/components/schemas/ItemResult' $ref: '#/components/schemas/ItemResult'
required:
- tweetResult
TweetResultByRestIdResponse: TweetResultByRestIdResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/TweetResultByRestIdData' $ref: '#/components/schemas/TweetResultByRestIdData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TweetRetweetersResponse: TweetRetweetersResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/TweetRetweetersResponseData' $ref: '#/components/schemas/TweetRetweetersResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TweetRetweetersResponseData: TweetRetweetersResponseData:
properties: properties:
retweeters_timeline: retweeters_timeline:
$ref: '#/components/schemas/TimelineV2' $ref: '#/components/schemas/TimelineV2'
required:
- retweeters_timeline
TweetTombstone: TweetTombstone:
additionalProperties: true additionalProperties: true
properties: properties:
@ -2573,12 +2584,14 @@ components:
properties: properties:
unfavorite_tweet: unfavorite_tweet:
type: string type: string
required: UnfavoriteTweetResponse:
- unfavorite_tweet
UnfavoriteTweetResponseData:
properties: properties:
data: data:
$ref: '#/components/schemas/UnfavoriteTweet' $ref: '#/components/schemas/UnfavoriteTweet'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UnifiedCard: UnifiedCard:
@ -2714,12 +2727,14 @@ components:
properties: properties:
user: user:
$ref: '#/components/schemas/UserHighlightsTweetsUser' $ref: '#/components/schemas/UserHighlightsTweetsUser'
required:
- user
UserHighlightsTweetsResponse: UserHighlightsTweetsResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/UserHighlightsTweetsData' $ref: '#/components/schemas/UserHighlightsTweetsData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UserHighlightsTweetsResult: UserHighlightsTweetsResult:
@ -2934,6 +2949,10 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/UserResponseData' $ref: '#/components/schemas/UserResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UserResponseData: UserResponseData:
@ -3019,12 +3038,14 @@ components:
properties: properties:
user: user:
$ref: '#/components/schemas/UserTweetsUser' $ref: '#/components/schemas/UserTweetsUser'
required:
- user
UserTweetsResponse: UserTweetsResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/UserTweetsData' $ref: '#/components/schemas/UserTweetsData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UserTweetsResult: UserTweetsResult:
@ -3129,6 +3150,10 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/UsersResponseData' $ref: '#/components/schemas/UsersResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UsersResponseData: UsersResponseData:
@ -3137,8 +3162,6 @@ components:
items: items:
$ref: '#/components/schemas/UserResults' $ref: '#/components/schemas/UserResults'
type: array type: array
required:
- users
securitySchemes: securitySchemes:
Accept: Accept:
description: '*/*' description: '*/*'
@ -4076,9 +4099,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/BookmarksResponse'
- $ref: '#/components/schemas/BookmarksResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4147,9 +4168,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/CreateBookmarkResponse'
- $ref: '#/components/schemas/CreateBookmarkResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4223,9 +4242,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/CreateRetweetResponse'
- $ref: '#/components/schemas/CreateRetweetResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4477,9 +4494,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/CreateTweetResponse'
- $ref: '#/components/schemas/CreateTweetResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4548,9 +4563,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/DeleteBookmarkResponse'
- $ref: '#/components/schemas/DeleteBookmarkResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4624,9 +4637,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/DeleteRetweetResponse'
- $ref: '#/components/schemas/DeleteRetweetResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4700,9 +4711,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/DeleteTweetResponse'
- $ref: '#/components/schemas/DeleteTweetResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4771,9 +4780,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/FavoriteTweetResponse'
- $ref: '#/components/schemas/FavoriteTweetResponseData'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4861,9 +4868,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TweetFavoritersResponse'
- $ref: '#/components/schemas/TweetFavoritersResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4951,9 +4956,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5041,9 +5044,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5131,9 +5132,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5221,9 +5220,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TimelineResponse'
- $ref: '#/components/schemas/TimelineResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5313,9 +5310,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TimelineResponse'
- $ref: '#/components/schemas/TimelineResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5412,9 +5407,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5500,9 +5493,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/ListLatestTweetsTimelineResponse'
- $ref: '#/components/schemas/ListLatestTweetsTimelineResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5562,9 +5553,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/ProfileResponse'
- $ref: '#/components/schemas/ProfileResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5650,9 +5639,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TweetRetweetersResponse'
- $ref: '#/components/schemas/TweetRetweetersResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5740,9 +5727,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/SearchTimelineResponse'
- $ref: '#/components/schemas/SearchTimelineResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5843,9 +5828,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TweetDetailResponse'
- $ref: '#/components/schemas/TweetDetailResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5946,9 +5929,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TweetResultByRestIdResponse'
- $ref: '#/components/schemas/TweetResultByRestIdResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6020,9 +6001,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UnfavoriteTweetResponse'
- $ref: '#/components/schemas/UnfavoriteTweetResponseData'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6090,9 +6069,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserResponse'
- $ref: '#/components/schemas/UserResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6173,9 +6150,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserResponse'
- $ref: '#/components/schemas/UserResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6263,9 +6238,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserHighlightsTweetsResponse'
- $ref: '#/components/schemas/UserHighlightsTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6362,9 +6335,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6461,9 +6432,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6558,9 +6527,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6624,9 +6591,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UsersResponse'
- $ref: '#/components/schemas/UsersResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6664,7 +6629,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/OtherResponse' $ref: '#/components/schemas/OtherObjectAll'
description: Successful operation description: Successful operation
tags: tags:
- other - other

File diff suppressed because it is too large Load diff

View file

@ -266,14 +266,14 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/BookmarksResponseData' $ref: '#/components/schemas/BookmarksResponseData'
required: errors:
- data items:
$ref: '#/components/schemas/Error'
type: array
BookmarksResponseData: BookmarksResponseData:
properties: properties:
bookmark_timeline_v2: bookmark_timeline_v2:
$ref: '#/components/schemas/BookmarksTimeline' $ref: '#/components/schemas/BookmarksTimeline'
required:
- bookmark_timeline_v2
BookmarksTimeline: BookmarksTimeline:
properties: properties:
timeline: timeline:
@ -577,14 +577,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/CreateBookmarkResponseData' $ref: '#/components/schemas/CreateBookmarkResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
CreateBookmarkResponseData: CreateBookmarkResponseData:
properties: properties:
tweet_bookmark_put: tweet_bookmark_put:
type: string type: string
required:
- tweet_bookmark_put
CreateRetweet: CreateRetweet:
properties: properties:
result: result:
@ -595,14 +597,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/CreateRetweetResponseData' $ref: '#/components/schemas/CreateRetweetResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
CreateRetweetResponseData: CreateRetweetResponseData:
properties: properties:
create_retweet: create_retweet:
$ref: '#/components/schemas/CreateRetweetResponseResult' $ref: '#/components/schemas/CreateRetweetResponseResult'
required:
- create_retweet
CreateRetweetResponseResult: CreateRetweetResponseResult:
properties: properties:
retweet_results: retweet_results:
@ -619,14 +623,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/CreateTweetResponseData' $ref: '#/components/schemas/CreateTweetResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
CreateTweetResponseData: CreateTweetResponseData:
properties: properties:
create_tweet: create_tweet:
$ref: '#/components/schemas/CreateTweetResponseResult' $ref: '#/components/schemas/CreateTweetResponseResult'
required:
- create_tweet
CreateTweetResponseResult: CreateTweetResponseResult:
properties: properties:
tweet_results: tweet_results:
@ -654,14 +660,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/DeleteBookmarkResponseData' $ref: '#/components/schemas/DeleteBookmarkResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
DeleteBookmarkResponseData: DeleteBookmarkResponseData:
properties: properties:
tweet_bookmark_delete: tweet_bookmark_delete:
type: string type: string
required:
- tweet_bookmark_delete
DeleteRetweet: DeleteRetweet:
properties: properties:
result: result:
@ -674,14 +682,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/DeleteRetweetResponseData' $ref: '#/components/schemas/DeleteRetweetResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
DeleteRetweetResponseData: DeleteRetweetResponseData:
properties: properties:
create_retweet: create_retweet:
$ref: '#/components/schemas/CreateRetweetResponseResult' $ref: '#/components/schemas/DeleteRetweetResponseResult'
required:
- unretweet
DeleteRetweetResponseResult: DeleteRetweetResponseResult:
properties: properties:
retweet_results: retweet_results:
@ -692,14 +702,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/DeleteTweetResponseData' $ref: '#/components/schemas/DeleteTweetResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
DeleteTweetResponseData: DeleteTweetResponseData:
properties: properties:
delete_retweet: delete_retweet:
$ref: '#/components/schemas/DeleteTweetResponseResult' $ref: '#/components/schemas/DeleteTweetResponseResult'
required:
- delete_tweet
DeleteTweetResponseResult: DeleteTweetResponseResult:
properties: properties:
tweet_results: tweet_results:
@ -811,23 +823,6 @@ components:
- kind - kind
- tracing - tracing
type: object type: object
Errors:
properties:
data:
$ref: '#/components/schemas/ErrorsData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required:
- errors
type: object
ErrorsData:
properties:
user:
pattern: dummy
type: string
type: object
ExtMediaAvailability: ExtMediaAvailability:
properties: properties:
reason: reason:
@ -849,12 +844,14 @@ components:
properties: properties:
favorite_tweet: favorite_tweet:
type: string type: string
required: FavoriteTweetResponse:
- favorite_tweet
FavoriteTweetResponseData:
properties: properties:
data: data:
$ref: '#/components/schemas/FavoriteTweet' $ref: '#/components/schemas/FavoriteTweet'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
FeedbackInfo: FeedbackInfo:
@ -869,14 +866,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/FollowResponseData' $ref: '#/components/schemas/FollowResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
FollowResponseData: FollowResponseData:
properties: properties:
user: user:
$ref: '#/components/schemas/FollowResponseUser' $ref: '#/components/schemas/FollowResponseUser'
required:
- user
FollowResponseResult: FollowResponseResult:
properties: properties:
__typename: __typename:
@ -920,8 +919,6 @@ components:
properties: properties:
home: home:
$ref: '#/components/schemas/HomeTimelineHome' $ref: '#/components/schemas/HomeTimelineHome'
required:
- home
InstructionType: InstructionType:
enum: enum:
- TimelineAddEntries - TimelineAddEntries
@ -981,6 +978,10 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/ListTweetsTimelineData' $ref: '#/components/schemas/ListTweetsTimelineData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
ListTweetsTimeline: ListTweetsTimeline:
@ -991,8 +992,6 @@ components:
properties: properties:
list: list:
$ref: '#/components/schemas/ListTweetsTimelineList' $ref: '#/components/schemas/ListTweetsTimelineList'
required:
- list
ListTweetsTimelineList: ListTweetsTimelineList:
properties: properties:
tweets_timeline: tweets_timeline:
@ -1368,7 +1367,7 @@ components:
required: required:
- fetchStatus - fetchStatus
type: object type: object
OtherResponse: OtherObjectAll:
properties: properties:
Session: Session:
$ref: '#/components/schemas/Session' $ref: '#/components/schemas/Session'
@ -1387,14 +1386,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/ProfileResponseData' $ref: '#/components/schemas/ProfileResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
ProfileResponseData: ProfileResponseData:
properties: properties:
user_result_by_screen_name: user_result_by_screen_name:
$ref: '#/components/schemas/UserResultByScreenName' $ref: '#/components/schemas/UserResultByScreenName'
required:
- user_result_by_screen_name
QuotedRefResult: QuotedRefResult:
properties: properties:
result: result:
@ -1445,12 +1446,14 @@ components:
properties: properties:
search_by_raw_query: search_by_raw_query:
$ref: '#/components/schemas/SearchByRawQuery' $ref: '#/components/schemas/SearchByRawQuery'
required:
- search_by_raw_query
SearchTimelineResponse: SearchTimelineResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/SearchTimelineData' $ref: '#/components/schemas/SearchTimelineData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
SelfThread: SelfThread:
@ -1468,10 +1471,6 @@ components:
type: boolean type: boolean
other: other:
type: boolean type: boolean
required:
- adult_content
- graphic_violence
- other
Session: Session:
properties: properties:
SsoInitTokens: SsoInitTokens:
@ -1800,6 +1799,10 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/HomeTimelineResponseData' $ref: '#/components/schemas/HomeTimelineResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TimelineShowAlert: TimelineShowAlert:
@ -2199,14 +2202,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/TweetDetailResponseData' $ref: '#/components/schemas/TweetDetailResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TweetDetailResponseData: TweetDetailResponseData:
properties: properties:
threaded_conversation_with_injections_v2: threaded_conversation_with_injections_v2:
$ref: '#/components/schemas/Timeline' $ref: '#/components/schemas/Timeline'
required:
- threaded_conversation_with_injections_v2
TweetEditControl: TweetEditControl:
properties: properties:
edit_control_initial: edit_control_initial:
@ -2257,14 +2262,16 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/TweetFavoritersResponseData' $ref: '#/components/schemas/TweetFavoritersResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TweetFavoritersResponseData: TweetFavoritersResponseData:
properties: properties:
favoriters_timeline: favoriters_timeline:
$ref: '#/components/schemas/TimelineV2' $ref: '#/components/schemas/TimelineV2'
required:
- favoriters_timeline
TweetInterstitial: TweetInterstitial:
properties: properties:
__typename: __typename:
@ -2464,26 +2471,30 @@ components:
properties: properties:
tweetResult: tweetResult:
$ref: '#/components/schemas/ItemResult' $ref: '#/components/schemas/ItemResult'
required:
- tweetResult
TweetResultByRestIdResponse: TweetResultByRestIdResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/TweetResultByRestIdData' $ref: '#/components/schemas/TweetResultByRestIdData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TweetRetweetersResponse: TweetRetweetersResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/TweetRetweetersResponseData' $ref: '#/components/schemas/TweetRetweetersResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
TweetRetweetersResponseData: TweetRetweetersResponseData:
properties: properties:
retweeters_timeline: retweeters_timeline:
$ref: '#/components/schemas/TimelineV2' $ref: '#/components/schemas/TimelineV2'
required:
- retweeters_timeline
TweetTombstone: TweetTombstone:
additionalProperties: true additionalProperties: true
properties: properties:
@ -2573,12 +2584,14 @@ components:
properties: properties:
unfavorite_tweet: unfavorite_tweet:
type: string type: string
required: UnfavoriteTweetResponse:
- unfavorite_tweet
UnfavoriteTweetResponseData:
properties: properties:
data: data:
$ref: '#/components/schemas/UnfavoriteTweet' $ref: '#/components/schemas/UnfavoriteTweet'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UnifiedCard: UnifiedCard:
@ -2714,12 +2727,14 @@ components:
properties: properties:
user: user:
$ref: '#/components/schemas/UserHighlightsTweetsUser' $ref: '#/components/schemas/UserHighlightsTweetsUser'
required:
- user
UserHighlightsTweetsResponse: UserHighlightsTweetsResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/UserHighlightsTweetsData' $ref: '#/components/schemas/UserHighlightsTweetsData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UserHighlightsTweetsResult: UserHighlightsTweetsResult:
@ -2934,6 +2949,10 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/UserResponseData' $ref: '#/components/schemas/UserResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UserResponseData: UserResponseData:
@ -3019,12 +3038,14 @@ components:
properties: properties:
user: user:
$ref: '#/components/schemas/UserTweetsUser' $ref: '#/components/schemas/UserTweetsUser'
required:
- user
UserTweetsResponse: UserTweetsResponse:
properties: properties:
data: data:
$ref: '#/components/schemas/UserTweetsData' $ref: '#/components/schemas/UserTweetsData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UserTweetsResult: UserTweetsResult:
@ -3129,6 +3150,10 @@ components:
properties: properties:
data: data:
$ref: '#/components/schemas/UsersResponseData' $ref: '#/components/schemas/UsersResponseData'
errors:
items:
$ref: '#/components/schemas/Error'
type: array
required: required:
- data - data
UsersResponseData: UsersResponseData:
@ -3137,8 +3162,6 @@ components:
items: items:
$ref: '#/components/schemas/UserResults' $ref: '#/components/schemas/UserResults'
type: array type: array
required:
- users
securitySchemes: securitySchemes:
Accept: Accept:
description: '*/*' description: '*/*'
@ -4182,9 +4205,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/BookmarksResponse'
- $ref: '#/components/schemas/BookmarksResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4253,9 +4274,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/CreateBookmarkResponse'
- $ref: '#/components/schemas/CreateBookmarkResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4329,9 +4348,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/CreateRetweetResponse'
- $ref: '#/components/schemas/CreateRetweetResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4583,9 +4600,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/CreateTweetResponse'
- $ref: '#/components/schemas/CreateTweetResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4654,9 +4669,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/DeleteBookmarkResponse'
- $ref: '#/components/schemas/DeleteBookmarkResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4730,9 +4743,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/DeleteRetweetResponse'
- $ref: '#/components/schemas/DeleteRetweetResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4806,9 +4817,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/DeleteTweetResponse'
- $ref: '#/components/schemas/DeleteTweetResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -4877,9 +4886,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/FavoriteTweetResponse'
- $ref: '#/components/schemas/FavoriteTweetResponseData'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5073,9 +5080,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TweetFavoritersResponse'
- $ref: '#/components/schemas/TweetFavoritersResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5269,9 +5274,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5465,9 +5468,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5661,9 +5662,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/FollowResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -5869,9 +5868,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TimelineResponse'
- $ref: '#/components/schemas/TimelineResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6082,9 +6079,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TimelineResponse'
- $ref: '#/components/schemas/TimelineResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6312,9 +6307,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6503,9 +6496,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/ListLatestTweetsTimelineResponse'
- $ref: '#/components/schemas/ListLatestTweetsTimelineResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6573,9 +6564,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/ProfileResponse'
- $ref: '#/components/schemas/ProfileResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6767,9 +6756,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TweetRetweetersResponse'
- $ref: '#/components/schemas/TweetRetweetersResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -6968,9 +6955,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/SearchTimelineResponse'
- $ref: '#/components/schemas/SearchTimelineResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -7223,9 +7208,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TweetDetailResponse'
- $ref: '#/components/schemas/TweetDetailResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -7453,9 +7436,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/TweetResultByRestIdResponse'
- $ref: '#/components/schemas/TweetResultByRestIdResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -7527,9 +7508,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UnfavoriteTweetResponse'
- $ref: '#/components/schemas/UnfavoriteTweetResponseData'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -7648,9 +7627,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserResponse'
- $ref: '#/components/schemas/UserResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -7793,9 +7770,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserResponse'
- $ref: '#/components/schemas/UserResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -7994,9 +7969,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserHighlightsTweetsResponse'
- $ref: '#/components/schemas/UserHighlightsTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -8224,9 +8197,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -8449,9 +8420,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -8674,9 +8643,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/UserTweetsResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -8772,9 +8739,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: '#/components/schemas/UsersResponse'
- $ref: '#/components/schemas/UsersResponse'
- $ref: '#/components/schemas/Errors'
description: Successful operation description: Successful operation
headers: headers:
x-connection-hash: x-connection-hash:
@ -8812,7 +8777,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/OtherResponse' $ref: '#/components/schemas/OtherObjectAll'
description: Successful operation description: Successful operation
tags: tags:
- other - other

View file

@ -14,24 +14,22 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/BookmarksResponse"
- $ref: "#/components/schemas/BookmarksResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
components: components:
schemas: schemas:
BookmarksResponse: BookmarksResponse:
required:
- "data"
properties: properties:
data: data:
$ref: "#/components/schemas/BookmarksResponseData" $ref: "#/components/schemas/BookmarksResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
BookmarksResponseData: BookmarksResponseData:
required:
- "bookmark_timeline_v2"
properties: properties:
bookmark_timeline_v2: bookmark_timeline_v2:
$ref: "#/components/schemas/BookmarksTimeline" $ref: "#/components/schemas/BookmarksTimeline"

View file

@ -14,9 +14,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/FollowResponse"
- $ref: "#/components/schemas/FollowResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"
@ -30,9 +28,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/FollowResponse"
- $ref: "#/components/schemas/FollowResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"
@ -46,9 +42,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/FollowResponse"
- $ref: "#/components/schemas/FollowResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"
@ -60,10 +54,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/FollowResponseData" $ref: "#/components/schemas/FollowResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
FollowResponseData: FollowResponseData:
required:
- "user"
properties: properties:
user: user:
$ref: "#/components/schemas/FollowResponseUser" $ref: "#/components/schemas/FollowResponseUser"

View file

@ -14,13 +14,13 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/OtherResponse" $ref: "#/components/schemas/OtherObjectAll"
tags: tags:
- "other" - "other"
components: components:
schemas: schemas:
OtherResponse: OtherObjectAll:
type: object type: object
properties: properties:
Session: Session:

View file

@ -14,9 +14,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/FavoriteTweetResponse"
- $ref: "#/components/schemas/FavoriteTweetResponseData"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -30,9 +28,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/UnfavoriteTweetResponse"
- $ref: "#/components/schemas/UnfavoriteTweetResponseData"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -46,9 +42,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/CreateRetweetResponse"
- $ref: "#/components/schemas/CreateRetweetResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -62,9 +56,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/DeleteRetweetResponse"
- $ref: "#/components/schemas/DeleteRetweetResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -78,9 +70,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/CreateTweetResponse"
- $ref: "#/components/schemas/CreateTweetResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -94,9 +84,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/DeleteTweetResponse"
- $ref: "#/components/schemas/DeleteTweetResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -110,9 +98,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/CreateBookmarkResponse"
- $ref: "#/components/schemas/CreateBookmarkResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
@ -126,38 +112,43 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/DeleteBookmarkResponse"
- $ref: "#/components/schemas/DeleteBookmarkResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "post" - "post"
components: components:
schemas: schemas:
FavoriteTweetResponseData: # ---Favorite---
FavoriteTweetResponse:
required: required:
- "data" - "data"
properties: properties:
data: data:
$ref: "#/components/schemas/FavoriteTweet" $ref: "#/components/schemas/FavoriteTweet"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
FavoriteTweet: FavoriteTweet:
required:
- "favorite_tweet"
properties: properties:
favorite_tweet: favorite_tweet:
type: string type: string
UnfavoriteTweetResponseData: # ---Unfavorite---
UnfavoriteTweetResponse:
required: required:
- "data" - "data"
properties: properties:
data: data:
$ref: "#/components/schemas/UnfavoriteTweet" $ref: "#/components/schemas/UnfavoriteTweet"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
UnfavoriteTweet: UnfavoriteTweet:
required:
- "unfavorite_tweet"
properties: properties:
unfavorite_tweet: unfavorite_tweet:
type: string type: string
@ -170,10 +161,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/CreateRetweetResponseData" $ref: "#/components/schemas/CreateRetweetResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
CreateRetweetResponseData: CreateRetweetResponseData:
required:
- "create_retweet"
properties: properties:
create_retweet: create_retweet:
$ref: "#/components/schemas/CreateRetweetResponseResult" $ref: "#/components/schemas/CreateRetweetResponseResult"
@ -208,19 +201,23 @@ components:
full_text: full_text:
type: string type: string
# ---DeleteRetweet---
DeleteRetweetResponse: DeleteRetweetResponse:
required: required:
- "data" - "data"
properties: properties:
data: data:
$ref: "#/components/schemas/DeleteRetweetResponseData" $ref: "#/components/schemas/DeleteRetweetResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
DeleteRetweetResponseData: DeleteRetweetResponseData:
required:
- "unretweet"
properties: properties:
create_retweet: create_retweet:
$ref: "#/components/schemas/CreateRetweetResponseResult" $ref: "#/components/schemas/DeleteRetweetResponseResult"
DeleteRetweetResponseResult: DeleteRetweetResponseResult:
required: required:
@ -246,10 +243,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/CreateTweetResponseData" $ref: "#/components/schemas/CreateTweetResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
CreateTweetResponseData: CreateTweetResponseData:
required:
- "create_tweet"
properties: properties:
create_tweet: create_tweet:
$ref: "#/components/schemas/CreateTweetResponseResult" $ref: "#/components/schemas/CreateTweetResponseResult"
@ -268,16 +267,20 @@ components:
result: result:
$ref: "./../schemas/tweet.yaml#/components/schemas/Tweet" $ref: "./../schemas/tweet.yaml#/components/schemas/Tweet"
# ---DeleteTweet---
DeleteTweetResponse: DeleteTweetResponse:
required: required:
- "data" - "data"
properties: properties:
data: data:
$ref: "#/components/schemas/DeleteTweetResponseData" $ref: "#/components/schemas/DeleteTweetResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
DeleteTweetResponseData: DeleteTweetResponseData:
required:
- "delete_tweet"
properties: properties:
delete_retweet: delete_retweet:
$ref: "#/components/schemas/DeleteTweetResponseResult" $ref: "#/components/schemas/DeleteTweetResponseResult"
@ -289,30 +292,38 @@ components:
tweet_results: tweet_results:
type: object type: object
# ---Bookmark---
CreateBookmarkResponse: CreateBookmarkResponse:
required: required:
- "data" - "data"
properties: properties:
data: data:
$ref: "#/components/schemas/CreateBookmarkResponseData" $ref: "#/components/schemas/CreateBookmarkResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
CreateBookmarkResponseData: CreateBookmarkResponseData:
required:
- "tweet_bookmark_put"
properties: properties:
tweet_bookmark_put: tweet_bookmark_put:
type: string type: string
# ---DeleteBookmark---
DeleteBookmarkResponse: DeleteBookmarkResponse:
required: required:
- "data" - "data"
properties: properties:
data: data:
$ref: "#/components/schemas/DeleteBookmarkResponseData" $ref: "#/components/schemas/DeleteBookmarkResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
DeleteBookmarkResponseData: DeleteBookmarkResponseData:
required:
- "tweet_bookmark_delete"
properties: properties:
tweet_bookmark_delete: tweet_bookmark_delete:
type: string type: string

View file

@ -14,9 +14,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/ProfileResponse"
- $ref: "#/components/schemas/ProfileResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
components: components:
schemas: schemas:
@ -26,10 +24,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/ProfileResponseData" $ref: "#/components/schemas/ProfileResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
ProfileResponseData: ProfileResponseData:
required:
- "user_result_by_screen_name"
properties: properties:
user_result_by_screen_name: user_result_by_screen_name:
$ref: "#/components/schemas/UserResultByScreenName" $ref: "#/components/schemas/UserResultByScreenName"

View file

@ -14,9 +14,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/TimelineResponse"
- $ref: "#/components/schemas/TimelineResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -30,9 +28,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/TimelineResponse"
- $ref: "#/components/schemas/TimelineResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -46,9 +42,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/ListLatestTweetsTimelineResponse"
- $ref: "#/components/schemas/ListLatestTweetsTimelineResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -62,9 +56,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/SearchTimelineResponse"
- $ref: "#/components/schemas/SearchTimelineResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -76,10 +68,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/HomeTimelineResponseData" $ref: "#/components/schemas/HomeTimelineResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
HomeTimelineResponseData: HomeTimelineResponseData:
required:
- "home"
properties: properties:
home: home:
$ref: "#/components/schemas/HomeTimelineHome" $ref: "#/components/schemas/HomeTimelineHome"
@ -97,10 +91,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/ListTweetsTimelineData" $ref: "#/components/schemas/ListTweetsTimelineData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
ListTweetsTimelineData: ListTweetsTimelineData:
required:
- "list"
properties: properties:
list: list:
$ref: "#/components/schemas/ListTweetsTimelineList" $ref: "#/components/schemas/ListTweetsTimelineList"
@ -123,10 +119,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/SearchTimelineData" $ref: "#/components/schemas/SearchTimelineData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
SearchTimelineData: SearchTimelineData:
required:
- "search_by_raw_query"
properties: properties:
search_by_raw_query: search_by_raw_query:
$ref: "#/components/schemas/SearchByRawQuery" $ref: "#/components/schemas/SearchByRawQuery"

View file

@ -14,9 +14,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/TweetDetailResponse"
- $ref: "#/components/schemas/TweetDetailResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -30,9 +28,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/TweetResultByRestIdResponse"
- $ref: "#/components/schemas/TweetResultByRestIdResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
# tags: # tags:
# - "tweet" # - "tweet"
@ -46,9 +42,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/TweetFavoritersResponse"
- $ref: "#/components/schemas/TweetFavoritersResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"
@ -62,9 +56,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/TweetRetweetersResponse"
- $ref: "#/components/schemas/TweetRetweetersResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user-list" - "user-list"
@ -76,10 +68,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/TweetDetailResponseData" $ref: "#/components/schemas/TweetDetailResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
TweetDetailResponseData: TweetDetailResponseData:
required:
- "threaded_conversation_with_injections_v2"
properties: properties:
threaded_conversation_with_injections_v2: threaded_conversation_with_injections_v2:
$ref: "./../schemas/timeline.yaml#/components/schemas/Timeline" $ref: "./../schemas/timeline.yaml#/components/schemas/Timeline"
@ -90,10 +84,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/TweetResultByRestIdData" $ref: "#/components/schemas/TweetResultByRestIdData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
TweetResultByRestIdData: TweetResultByRestIdData:
required:
- "tweetResult"
properties: properties:
tweetResult: tweetResult:
$ref: "./../schemas/content.yaml#/components/schemas/ItemResult" $ref: "./../schemas/content.yaml#/components/schemas/ItemResult"
@ -104,10 +100,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/TweetFavoritersResponseData" $ref: "#/components/schemas/TweetFavoritersResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
TweetFavoritersResponseData: TweetFavoritersResponseData:
required:
- "favoriters_timeline"
properties: properties:
favoriters_timeline: favoriters_timeline:
$ref: "./../schemas/timeline.yaml#/components/schemas/TimelineV2" $ref: "./../schemas/timeline.yaml#/components/schemas/TimelineV2"
@ -118,10 +116,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/TweetRetweetersResponseData" $ref: "#/components/schemas/TweetRetweetersResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
TweetRetweetersResponseData: TweetRetweetersResponseData:
required:
- "retweeters_timeline"
properties: properties:
retweeters_timeline: retweeters_timeline:
$ref: "./../schemas/timeline.yaml#/components/schemas/TimelineV2" $ref: "./../schemas/timeline.yaml#/components/schemas/TimelineV2"

View file

@ -14,9 +14,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/UserResponse"
- $ref: "#/components/schemas/UserResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user" - "user"
@ -30,9 +28,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/UserResponse"
- $ref: "#/components/schemas/UserResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "user" - "user"
@ -46,9 +42,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/UsersResponse"
- $ref: "#/components/schemas/UsersResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "users" - "users"
@ -60,6 +54,10 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/UserResponseData" $ref: "#/components/schemas/UserResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
UserResponseData: UserResponseData:
properties: properties:
@ -72,10 +70,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/UsersResponseData" $ref: "#/components/schemas/UsersResponseData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
UsersResponseData: UsersResponseData:
required:
- "users"
properties: properties:
users: users:
type: array type: array

View file

@ -14,9 +14,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -30,9 +28,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -46,9 +42,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/UserHighlightsTweetsResponse"
- $ref: "#/components/schemas/UserHighlightsTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -62,9 +56,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -78,9 +70,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags: tags:
- "tweet" - "tweet"
@ -92,10 +82,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/UserTweetsData" $ref: "#/components/schemas/UserTweetsData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
UserTweetsData: UserTweetsData:
required:
- "user"
properties: properties:
user: user:
$ref: "#/components/schemas/UserTweetsUser" $ref: "#/components/schemas/UserTweetsUser"
@ -123,10 +115,12 @@ components:
properties: properties:
data: data:
$ref: "#/components/schemas/UserHighlightsTweetsData" $ref: "#/components/schemas/UserHighlightsTweetsData"
errors:
type: array
items:
$ref: "./../response/error.yaml#/components/schemas/Error"
UserHighlightsTweetsData: UserHighlightsTweetsData:
required:
- "user"
properties: properties:
user: user:
$ref: "#/components/schemas/UserHighlightsTweetsUser" $ref: "#/components/schemas/UserHighlightsTweetsUser"

View file

@ -6,25 +6,6 @@ info:
paths: {} paths: {}
components: components:
schemas: schemas:
Errors:
type: object
required:
- errors
properties:
errors:
type: array
items:
$ref: "#/components/schemas/Error"
data:
$ref: "#/components/schemas/ErrorsData"
ErrorsData:
type: object
properties:
user:
type: string # always null
pattern: "dummy"
Error: Error:
type: object type: object
required: required:

View file

@ -1316,10 +1316,6 @@ components:
enum: [Available, Unavailable] enum: [Available, Unavailable]
SensitiveMediaWarning: SensitiveMediaWarning:
required:
- "adult_content"
- "graphic_violence"
- "other"
properties: properties:
adult_content: adult_content:
type: boolean type: boolean

View file

@ -1,4 +1,4 @@
inputSpec: dist/compatible_discriminator/openapi-3.0.yaml inputSpec: dist/compatible/openapi-3.0.yaml
outputDir: python_generated outputDir: python_generated
useOneOfDiscriminatorLookup: true useOneOfDiscriminatorLookup: true

View file

@ -238,7 +238,7 @@ if __name__ == "__main__":
data = json.load(f) data = json.load(f)
try: try:
_ = pt.Errors.from_dict(data) _ = pt.TweetDetailResponse.from_dict(data)
except Exception as e: except Exception as e:
error_dump(e) error_dump(e)
access_token = "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA" access_token = "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"

View file

@ -3,7 +3,6 @@ from hooks import (
AddParametersOnContent, AddParametersOnContent,
AddParametersOnParameters, AddParametersOnParameters,
AddPathQueryIdOnParameters, AddPathQueryIdOnParameters,
RemoveErrorHandle,
SetResponsesHeader, SetResponsesHeader,
) )
@ -12,11 +11,7 @@ class Config:
OUTPUT_DIR = "dist/{0}" OUTPUT_DIR = "dist/{0}"
INPUT_DIR = "src/openapi" INPUT_DIR = "src/openapi"
def hooks_generator( def hooks_generator(self, queryParameterJson=True):
self,
queryParameterJson=True,
removeLegacyDiscriminatorBehavior=False,
):
# https://stackoverflow.com/questions/34820064/defining-an-api-with-swagger-get-call-that-uses-json-in-parameters/45223964 # https://stackoverflow.com/questions/34820064/defining-an-api-with-swagger-get-call-that-uses-json-in-parameters/45223964
if queryParameterJson: if queryParameterJson:
# ["parameters"][0]["content"]["application/json"]["schema"] # ["parameters"][0]["content"]["application/json"]["schema"]
@ -33,11 +28,6 @@ class Config:
ignoreKeys=["queryId"], ignoreKeys=["queryId"],
) )
# https://github.com/OpenAPITools/openapi-generator/issues/15373
additionalHooks = []
if removeLegacyDiscriminatorBehavior:
additionalHooks.append(RemoveErrorHandle())
return { return {
"openapi": [], "openapi": [],
"schemas": [], "schemas": [],
@ -47,7 +37,6 @@ class Config:
SetResponsesHeader(), SetResponsesHeader(),
AddPathQueryIdOnParameters(split=-1), AddPathQueryIdOnParameters(split=-1),
getParamHook, getParamHook,
*additionalHooks,
] ]
for key in ["default", "user", "users", "user-list", "tweet"] for key in ["default", "user", "users", "user-list", "tweet"]
} }
@ -60,7 +49,6 @@ class Config:
schemaType=None, schemaType=None,
contentType="application/json", contentType="application/json",
), ),
*additionalHooks,
] ]
for key in ["post"] for key in ["post"]
} }
@ -91,8 +79,4 @@ class Config:
"compatible": self.hooks_generator( "compatible": self.hooks_generator(
queryParameterJson=False, queryParameterJson=False,
), ),
"compatible_discriminator": self.hooks_generator(
queryParameterJson=False,
removeLegacyDiscriminatorBehavior=True,
),
} }

View file

@ -125,11 +125,11 @@ class RequestHookBase(HookBase):
# SchemasHookBase extends # SchemasHookBase extends
class RemoveDiscriminator(SchemasHookBase): # class RemoveDiscriminator(SchemasHookBase):
def hook(self, value: dict): # def hook(self, value: dict):
if value.get("discriminator") is not None: # if value.get("discriminator") is not None:
del value["discriminator"] # del value["discriminator"]
return value # return value
class SchemasCheck(SchemasHookBase): class SchemasCheck(SchemasHookBase):
@ -218,11 +218,11 @@ class AddPathQueryIdOnParameters(RequestHookBase):
return path, value return path, value
class RemoveErrorHandle(RequestHookBase): # class RemoveErrorHandle(RequestHookBase):
def hook(self, path: str, value: dict): # def hook(self, path: str, value: dict):
content = value["responses"]["200"]["content"]["application/json"] # content = value["responses"]["200"]["content"]["application/json"]
content["schema"] = content["schema"]["oneOf"][0] # content["schema"] = content["schema"]["oneOf"][0]
return path, value # return path, value
# OnParameters # OnParameters