mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
fix #22, update additionalProperties
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
0a7f111236
commit
cee095e948
8 changed files with 157 additions and 32 deletions
|
|
@ -14,7 +14,9 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/BookmarksResponse"
|
oneOf:
|
||||||
|
- $ref: "#/components/schemas/BookmarksResponse"
|
||||||
|
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
|
||||||
tags:
|
tags:
|
||||||
- "tweet"
|
- "tweet"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
# pattern: "^[0-9a-zA-Z]+$"
|
pattern: "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$" # base64
|
||||||
result:
|
result:
|
||||||
$ref: "#/components/schemas/UserResultByScreenNameResult"
|
$ref: "#/components/schemas/UserResultByScreenNameResult"
|
||||||
|
|
||||||
|
|
@ -59,7 +59,8 @@ components:
|
||||||
legacy:
|
legacy:
|
||||||
$ref: "#/components/schemas/UserResultByScreenNameLegacy"
|
$ref: "#/components/schemas/UserResultByScreenNameLegacy"
|
||||||
profilemodules:
|
profilemodules:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
rest_id:
|
rest_id:
|
||||||
type: string
|
type: string
|
||||||
pattern: "^[0-9]+$"
|
pattern: "^[0-9]+$"
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,11 @@ components:
|
||||||
itemContent:
|
itemContent:
|
||||||
$ref: "#/components/schemas/ItemContentUnion"
|
$ref: "#/components/schemas/ItemContentUnion"
|
||||||
clientEventInfo:
|
clientEventInfo:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
feedbackInfo:
|
feedbackInfo:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
|
|
||||||
TimelineTimelineModule:
|
TimelineTimelineModule:
|
||||||
required:
|
required:
|
||||||
|
|
@ -50,7 +52,6 @@ components:
|
||||||
properties:
|
properties:
|
||||||
__typename:
|
__typename:
|
||||||
type: string
|
type: string
|
||||||
value: TimelineTimelineModule
|
|
||||||
# $ref: "./typename.yaml#/components/schemas/TypeName" # TimelineTimelineModule
|
# $ref: "./typename.yaml#/components/schemas/TypeName" # TimelineTimelineModule
|
||||||
entryType:
|
entryType:
|
||||||
$ref: "#/components/schemas/ContentEntryType" # TimelineTimelineCursor
|
$ref: "#/components/schemas/ContentEntryType" # TimelineTimelineCursor
|
||||||
|
|
@ -61,12 +62,15 @@ components:
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/ModuleItem"
|
$ref: "#/components/schemas/ModuleItem"
|
||||||
footer:
|
footer:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
header:
|
header:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
|
|
||||||
clientEventInfo:
|
clientEventInfo:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
|
|
||||||
TimelineTimelineCursor:
|
TimelineTimelineCursor:
|
||||||
required:
|
required:
|
||||||
|
|
@ -95,7 +99,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
entryId:
|
entryId:
|
||||||
type: string
|
type: string
|
||||||
# pattern: '^[a-z\-]+[0-9]+$'
|
pattern: "^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+"
|
||||||
item:
|
item:
|
||||||
$ref: "#/components/schemas/ModuleEntry"
|
$ref: "#/components/schemas/ModuleEntry"
|
||||||
|
|
||||||
|
|
@ -105,7 +109,8 @@ components:
|
||||||
- "itemContent"
|
- "itemContent"
|
||||||
properties:
|
properties:
|
||||||
clientEventInfo:
|
clientEventInfo:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
itemContent:
|
itemContent:
|
||||||
$ref: "#/components/schemas/ItemContentUnion"
|
$ref: "#/components/schemas/ItemContentUnion"
|
||||||
|
|
||||||
|
|
@ -157,7 +162,8 @@ components:
|
||||||
SocialContext:
|
SocialContext:
|
||||||
$ref: "#/components/schemas/SocialContext"
|
$ref: "#/components/schemas/SocialContext"
|
||||||
promotedMetadata:
|
promotedMetadata:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
|
|
||||||
TimelineUser:
|
TimelineUser:
|
||||||
required:
|
required:
|
||||||
|
|
@ -197,12 +203,14 @@ components:
|
||||||
type:
|
type:
|
||||||
type: string # enum
|
type: string # enum
|
||||||
|
|
||||||
TimelinePrompt: # todo
|
TimelinePrompt:
|
||||||
properties:
|
properties:
|
||||||
__typename:
|
__typename:
|
||||||
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelinePrompt
|
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelinePrompt
|
||||||
|
additionalProperties: true # todo
|
||||||
|
|
||||||
TimelineMessagePrompt: # todo
|
TimelineMessagePrompt:
|
||||||
properties:
|
properties:
|
||||||
__typename:
|
__typename:
|
||||||
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelineMessagePrompt
|
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelineMessagePrompt
|
||||||
|
additionalProperties: true # todo
|
||||||
|
|
|
||||||
99
src/openapi/schemas/error.yaml
Normal file
99
src/openapi/schemas/error.yaml
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
openapi: 3.0.3
|
||||||
|
info:
|
||||||
|
title: Twitter OpenAPI
|
||||||
|
version: 0.0.1
|
||||||
|
|
||||||
|
paths: {}
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
Errors:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- errors
|
||||||
|
properties:
|
||||||
|
errors:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
|
||||||
|
Error:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- message
|
||||||
|
- locations
|
||||||
|
- path
|
||||||
|
- extensions
|
||||||
|
- code
|
||||||
|
- kind
|
||||||
|
- name
|
||||||
|
- source
|
||||||
|
- retry_after
|
||||||
|
- tracing
|
||||||
|
properties:
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
locations:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/Location"
|
||||||
|
path:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
extensions:
|
||||||
|
$ref: "#/components/schemas/ErrorExtensions"
|
||||||
|
code:
|
||||||
|
type: integer
|
||||||
|
kind:
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
source:
|
||||||
|
type: string
|
||||||
|
retry_after:
|
||||||
|
type: integer
|
||||||
|
tracing:
|
||||||
|
$ref: "#/components/schemas/Tracing"
|
||||||
|
|
||||||
|
Location:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- line
|
||||||
|
- column
|
||||||
|
properties:
|
||||||
|
line:
|
||||||
|
type: integer
|
||||||
|
column:
|
||||||
|
type: integer
|
||||||
|
|
||||||
|
ErrorExtensions:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
- source
|
||||||
|
- retry_after
|
||||||
|
- code
|
||||||
|
- kind
|
||||||
|
- tracing
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
source:
|
||||||
|
type: string
|
||||||
|
retry_after:
|
||||||
|
type: integer
|
||||||
|
code:
|
||||||
|
type: integer
|
||||||
|
kind:
|
||||||
|
type: string
|
||||||
|
tracing:
|
||||||
|
$ref: "#/components/schemas/Tracing"
|
||||||
|
|
||||||
|
Tracing:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- trace_id
|
||||||
|
properties:
|
||||||
|
trace_id:
|
||||||
|
type: string
|
||||||
|
pattern: "^[0-9a-f]{16}$"
|
||||||
|
|
@ -125,11 +125,14 @@ components:
|
||||||
entities:
|
entities:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
iconDisplayInfo:
|
iconDisplayInfo:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
colorConfig:
|
colorConfig:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
displayLocation:
|
displayLocation:
|
||||||
type: string
|
type: string
|
||||||
enum: [Top] # which else?
|
enum: [Top] # which else?
|
||||||
|
|
@ -155,7 +158,7 @@ components:
|
||||||
$ref: "./content.yaml#/components/schemas/ContentUnion"
|
$ref: "./content.yaml#/components/schemas/ContentUnion"
|
||||||
entryId:
|
entryId:
|
||||||
type: string
|
type: string
|
||||||
# pattern: '^[a-z\-]+[0-9]+$'
|
pattern: "^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+"
|
||||||
sortIndex:
|
sortIndex:
|
||||||
type: string
|
type: string
|
||||||
pattern: "[0-9]+$"
|
pattern: "[0-9]+$"
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ components:
|
||||||
items:
|
items:
|
||||||
$ref: "./../schemas/instruction.yaml#/components/schemas/InstructionUnion"
|
$ref: "./../schemas/instruction.yaml#/components/schemas/InstructionUnion"
|
||||||
metadata:
|
metadata:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
responseObjects:
|
responseObjects:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
__typename:
|
__typename:
|
||||||
$ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults
|
$ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults
|
||||||
# todo
|
additionalProperties: true # todo
|
||||||
|
|
||||||
Tweet:
|
Tweet:
|
||||||
required:
|
required:
|
||||||
|
|
@ -93,7 +93,8 @@ components:
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
unmention_data:
|
unmention_data:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
edit_control:
|
edit_control:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -241,11 +242,14 @@ components:
|
||||||
$ref: "#/components/schemas/Media"
|
$ref: "#/components/schemas/Media"
|
||||||
|
|
||||||
Hashtag:
|
Hashtag:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
Symbol:
|
Symbol:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
UserMention:
|
UserMention:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
Url:
|
Url:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
|
@ -310,7 +314,8 @@ components:
|
||||||
type:
|
type:
|
||||||
type: string # enum
|
type: string # enum
|
||||||
sizes:
|
sizes:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
original_info:
|
original_info:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -321,9 +326,11 @@ components:
|
||||||
focus_rects:
|
focus_rects:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
media_key:
|
media_key:
|
||||||
type: string
|
type: string
|
||||||
pattern: "^[0-9]+_[0-9]+$"
|
pattern: "^[0-9]+_[0-9]+$"
|
||||||
ext_media_availability:
|
ext_media_availability:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@ components:
|
||||||
__typename:
|
__typename:
|
||||||
$ref: "./typename.yaml#/components/schemas/TypeName" # User
|
$ref: "./typename.yaml#/components/schemas/TypeName" # User
|
||||||
affiliates_highlighted_label:
|
affiliates_highlighted_label:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
has_graduated_access:
|
has_graduated_access:
|
||||||
type: boolean
|
type: boolean
|
||||||
has_nft_avatar:
|
has_nft_avatar:
|
||||||
|
|
@ -43,7 +44,7 @@ components:
|
||||||
default: false
|
default: false
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
# pattern: '^[a-z\-]+[0-9]+$'
|
pattern: "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$" # base64
|
||||||
is_blue_verified:
|
is_blue_verified:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
@ -53,7 +54,8 @@ components:
|
||||||
type: string
|
type: string
|
||||||
pattern: "^[0-9]+$"
|
pattern: "^[0-9]+$"
|
||||||
business_account:
|
business_account:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
super_follow_eligible:
|
super_follow_eligible:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
@ -126,7 +128,8 @@ components:
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
entities:
|
entities:
|
||||||
type: object # todo
|
type: object
|
||||||
|
additionalProperties: true # todo
|
||||||
fast_followers_count:
|
fast_followers_count:
|
||||||
type: integer
|
type: integer
|
||||||
favourites_count:
|
favourites_count:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue