mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
Add retry_after property to error response and update SocialContext schema
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
d103390271
commit
44772ab7b5
3 changed files with 57 additions and 7 deletions
|
|
@ -32,6 +32,7 @@ components:
|
|||
- kind
|
||||
- name
|
||||
- source
|
||||
- retry_after
|
||||
- tracing
|
||||
properties:
|
||||
message:
|
||||
|
|
@ -54,6 +55,8 @@ components:
|
|||
type: string
|
||||
source:
|
||||
type: string
|
||||
retry_after:
|
||||
type: integer
|
||||
tracing:
|
||||
$ref: "#/components/schemas/Tracing"
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ components:
|
|||
tweet_results:
|
||||
$ref: "#/components/schemas/ItemResult"
|
||||
socialContext:
|
||||
$ref: "#/components/schemas/SocialContext"
|
||||
$ref: "#/components/schemas/SocialContextUnion"
|
||||
promotedMetadata:
|
||||
type: object
|
||||
additionalProperties: true # todo
|
||||
|
|
@ -210,7 +210,7 @@ components:
|
|||
itemType:
|
||||
$ref: "#/components/schemas/ContentItemType" # TimelineUser
|
||||
socialContext:
|
||||
$ref: "#/components/schemas/SocialContext"
|
||||
$ref: "#/components/schemas/SocialContextUnion"
|
||||
userDisplayType:
|
||||
type: string
|
||||
enum: [User, UserDetailed, SubscribableUser]
|
||||
|
|
@ -224,20 +224,66 @@ components:
|
|||
result:
|
||||
$ref: "./tweet.yaml#/components/schemas/TweetUnion"
|
||||
|
||||
SocialContext:
|
||||
SocialContextUnion:
|
||||
oneOf:
|
||||
- $ref: "#/components/schemas/TimelineGeneralContext"
|
||||
- $ref: "#/components/schemas/TimelineTopicContext"
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping": # deprecated
|
||||
TimelineGeneralContext: "#/components/schemas/TimelineGeneralContext"
|
||||
TimelineTopicContext: "#/components/schemas/TimelineTopicContext"
|
||||
|
||||
SocialContextUnionType:
|
||||
type: string
|
||||
enum:
|
||||
- TimelineGeneralContext
|
||||
- TimelineTopicContext
|
||||
|
||||
|
||||
TimelineGeneralContext:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
$ref: "#/components/schemas/SocialContextUnionType"
|
||||
contextType:
|
||||
type: string # enum
|
||||
enum: ["Follow", "Pin"]
|
||||
enum: ["Follow", "Pin", "Like", "Location", "Sparkle"]
|
||||
text:
|
||||
type: string
|
||||
type:
|
||||
type: string # enum
|
||||
enum: ["TimelineGeneralContext"]
|
||||
landingUrl:
|
||||
$ref: "#/components/schemas/SocialContextLandingUrl"
|
||||
|
||||
TimelineTopicContext:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
$ref: "#/components/schemas/SocialContextUnionType"
|
||||
topic:
|
||||
$ref: "#/components/schemas/TopicContext"
|
||||
functionalityType:
|
||||
type: string
|
||||
enum: ["Basic"]
|
||||
|
||||
TopicContext:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
topic_id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
icon_url:
|
||||
type: string
|
||||
format: uri
|
||||
following:
|
||||
type: boolean
|
||||
not_interested:
|
||||
type: boolean
|
||||
|
||||
SocialContextLandingUrl:
|
||||
type: object
|
||||
properties:
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ components:
|
|||
enum:
|
||||
- "Circle"
|
||||
- "Square"
|
||||
- "Hexagon"
|
||||
professional:
|
||||
$ref: "#/components/schemas/UserProfessional"
|
||||
user_seed_tweet_count:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue