mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 07:30:37 +01:00
add builder
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
9052b3a16a
commit
26908878c1
31 changed files with 2886 additions and 1549 deletions
152
src/openapi/schemas/tweet.yaml
Normal file
152
src/openapi/schemas/tweet.yaml
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
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"
|
||||
discriminator:
|
||||
propertyName: __typename
|
||||
mapping": # deprecated
|
||||
Tweet: "#/components/schemas/Tweet"
|
||||
TweetWithVisibilityResults: "#/components/schemas/TweetWithVisibilityResults"
|
||||
|
||||
TweetWithVisibilityResults:
|
||||
required:
|
||||
- "__typename"
|
||||
- "tweet"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults
|
||||
tweet:
|
||||
$ref: "#/components/schemas/Tweet"
|
||||
|
||||
Tweet:
|
||||
required:
|
||||
# - "__typename"
|
||||
- "rest_id"
|
||||
- "core"
|
||||
- "edit_control"
|
||||
- "edit_prespective"
|
||||
- "is_translatable"
|
||||
- "legacy"
|
||||
- "views"
|
||||
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # Tweet
|
||||
rest_id:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
core:
|
||||
$ref: "./user.yaml#/components/schemas/UserResultCore"
|
||||
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
|
||||
|
||||
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:
|
||||
type: object
|
||||
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
|
||||
user_id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
Loading…
Add table
Add a link
Reference in a new issue