openapi: 3.0.3 info: title: Twitter OpenAPI version: 0.0.1 paths: {} components: schemas: TweetUnion: 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: - "__typename" - "tweet" properties: __typename: $ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults tweet: $ref: "#/components/schemas/Tweet" TweetTombstone: #remove tweet properties: __typename: $ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults # todo Tweet: required: - "rest_id" - "core" - "edit_control" - "edit_prespective" - "is_translatable" - "legacy" - "views" properties: __typename: $ref: "./typename.yaml#/components/schemas/TypeName" # null | Tweet rest_id: type: string pattern: "^[0-9]+$" core: $ref: "./user.yaml#/components/schemas/UserResultCore" card: type: object properties: rest_id: type: string legacy: type: object required: - "binding_values" - "name" - "url" properties: name: type: string url: type: string binding_values: type: array items: type: object required: - "key" - "value" properties: key: type: string value: type: object required: - "type" properties: string_value: type: string boolean_value: type: boolean scribe_key: type: string type: type: string unmention_data: type: object # todo edit_control: type: object properties: edit_tweet_ids: type: array items: type: string pattern: "^[0-9]+$" editable_until_msecs: type: string pattern: "^[0-9]+$" is_edit_eligible: type: boolean edits_remaining: type: string pattern: "^[0-9]+$" edit_prespective: type: object properties: favorited: type: boolean retweeted: type: boolean is_translatable: type: boolean default: false legacy: $ref: "#/components/schemas/TweetLegacy" views: type: object properties: count: type: string pattern: "^[0-9]+$" state: type: string # enum quoted_status_result: $ref: "./content.yaml#/components/schemas/ItemResult" TweetLegacy: required: - "bookmark_count" - "bookmarked" - "conversation_id_str" - "created_at" - "display_text_range" - "entities" - "favorite_count" - "favorited" - "full_text" - "is_quote_status" - "lang" - "quote_count" - "reply_count" - "retweet_count" - "retweeted" - "user_id_str" - "id_str" properties: bookmark_count: type: integer bookmarked: type: boolean created_at: $ref: "./general.yaml#/components/schemas/TwitterTimeFormat" conversation_id_str: type: string pattern: "^[0-9]+$" display_text_range: type: array items: type: integer entities: $ref: "#/components/schemas/Entities" favorite_count: type: integer favorited: type: boolean full_text: type: string is_quote_status: type: boolean lang: type: string # enum possibly_sensitive: type: boolean default: false possibly_sensitive_editable: type: boolean default: false quote_count: type: integer reply_count: type: integer retweet_count: type: integer retweeted: type: boolean retweeted_status_result: $ref: "./content.yaml#/components/schemas/ItemResult" user_id_str: type: string pattern: "^[0-9]+$" id_str: type: string pattern: "^[0-9]+$" self_thread: type: object required: - "id_str" properties: id_str: type: string pattern: "^[0-9]+$" extended_entities: $ref: "#/components/schemas/ExtendedEntities" Entities: required: - "hashtags" - "symbols" - "user_mentions" - "urls" # - "media" properties: hashtags: type: array items: $ref: "#/components/schemas/Hashtag" symbols: type: array items: $ref: "#/components/schemas/Symbol" user_mentions: type: array items: $ref: "#/components/schemas/UserMention" urls: type: array items: $ref: "#/components/schemas/Url" media: type: array items: $ref: "#/components/schemas/Media" Hashtag: type: object # todo Symbol: type: object # todo UserMention: type: object # todo Url: type: object required: - "url" - "indices" - "expanded_url" - "display_url" properties: display_url: type: string expanded_url: type: string format: uri url: type: string format: uri indices: type: array items: type: integer ExtendedEntities: required: - "media" properties: media: type: array items: $ref: "#/components/schemas/Media" Media: required: - "id_str" - "indices" - "media_url_https" - "url" - "display_url" - "expanded_url" - "type" - "sizes" - "original_info" properties: id_str: type: string pattern: "^[0-9]+$" indices: type: array items: type: integer media_url_https: type: string format: uri url: type: string format: uri display_url: type: string format: uri expanded_url: type: string format: uri type: type: string # enum sizes: type: object # todo original_info: type: object properties: height: type: integer width: type: integer focus_rects: type: array items: type: object # todo media_key: type: string pattern: "^[0-9]+_[0-9]+$" ext_media_availability: type: object # todo