1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 07:30:37 +01:00

fix #22, update additionalProperties

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-07-30 19:43:04 +09:00
parent 0a7f111236
commit cee095e948
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
8 changed files with 157 additions and 32 deletions

View file

@ -14,7 +14,9 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/BookmarksResponse"
oneOf:
- $ref: "#/components/schemas/BookmarksResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags:
- "tweet"

View file

@ -39,7 +39,7 @@ components:
properties:
id:
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:
$ref: "#/components/schemas/UserResultByScreenNameResult"
@ -59,7 +59,8 @@ components:
legacy:
$ref: "#/components/schemas/UserResultByScreenNameLegacy"
profilemodules:
type: object # todo
type: object
additionalProperties: true # todo
rest_id:
type: string
pattern: "^[0-9]+$"

View file

@ -36,9 +36,11 @@ components:
itemContent:
$ref: "#/components/schemas/ItemContentUnion"
clientEventInfo:
type: object # todo
type: object
additionalProperties: true # todo
feedbackInfo:
type: object # todo
type: object
additionalProperties: true # todo
TimelineTimelineModule:
required:
@ -50,7 +52,6 @@ components:
properties:
__typename:
type: string
value: TimelineTimelineModule
# $ref: "./typename.yaml#/components/schemas/TypeName" # TimelineTimelineModule
entryType:
$ref: "#/components/schemas/ContentEntryType" # TimelineTimelineCursor
@ -61,12 +62,15 @@ components:
items:
$ref: "#/components/schemas/ModuleItem"
footer:
type: object # todo
type: object
additionalProperties: true # todo
header:
type: object # todo
type: object
additionalProperties: true # todo
clientEventInfo:
type: object # todo
type: object
additionalProperties: true # todo
TimelineTimelineCursor:
required:
@ -95,7 +99,7 @@ components:
properties:
entryId:
type: string
# pattern: '^[a-z\-]+[0-9]+$'
pattern: "^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+"
item:
$ref: "#/components/schemas/ModuleEntry"
@ -105,7 +109,8 @@ components:
- "itemContent"
properties:
clientEventInfo:
type: object # todo
type: object
additionalProperties: true # todo
itemContent:
$ref: "#/components/schemas/ItemContentUnion"
@ -157,7 +162,8 @@ components:
SocialContext:
$ref: "#/components/schemas/SocialContext"
promotedMetadata:
type: object # todo
type: object
additionalProperties: true # todo
TimelineUser:
required:
@ -197,12 +203,14 @@ components:
type:
type: string # enum
TimelinePrompt: # todo
TimelinePrompt:
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelinePrompt
additionalProperties: true # todo
TimelineMessagePrompt: # todo
TimelineMessagePrompt:
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelineMessagePrompt
additionalProperties: true # todo

View 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}$"

View file

@ -125,11 +125,14 @@ components:
entities:
type: array
items:
type: object # todo
type: object
additionalProperties: true # todo
iconDisplayInfo:
type: object # todo
type: object
additionalProperties: true # todo
colorConfig:
type: object # todo
type: object
additionalProperties: true # todo
displayLocation:
type: string
enum: [Top] # which else?
@ -155,7 +158,7 @@ components:
$ref: "./content.yaml#/components/schemas/ContentUnion"
entryId:
type: string
# pattern: '^[a-z\-]+[0-9]+$'
pattern: "^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+"
sortIndex:
type: string
pattern: "[0-9]+$"

View file

@ -22,6 +22,8 @@ components:
items:
$ref: "./../schemas/instruction.yaml#/components/schemas/InstructionUnion"
metadata:
type: object # todo
type: object
additionalProperties: true # todo
responseObjects:
type: object # todo
type: object
additionalProperties: true # todo

View file

@ -33,7 +33,7 @@ components:
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults
# todo
additionalProperties: true # todo
Tweet:
required:
@ -93,7 +93,8 @@ components:
type:
type: string
unmention_data:
type: object # todo
type: object
additionalProperties: true # todo
edit_control:
type: object
properties:
@ -241,11 +242,14 @@ components:
$ref: "#/components/schemas/Media"
Hashtag:
type: object # todo
type: object
additionalProperties: true # todo
Symbol:
type: object # todo
type: object
additionalProperties: true # todo
UserMention:
type: object # todo
type: object
additionalProperties: true # todo
Url:
type: object
required:
@ -310,7 +314,8 @@ components:
type:
type: string # enum
sizes:
type: object # todo
type: object
additionalProperties: true # todo
original_info:
type: object
properties:
@ -321,9 +326,11 @@ components:
focus_rects:
type: array
items:
type: object # todo
type: object
additionalProperties: true # todo
media_key:
type: string
pattern: "^[0-9]+_[0-9]+$"
ext_media_availability:
type: object # todo
type: object
additionalProperties: true # todo

View file

@ -35,7 +35,8 @@ components:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # User
affiliates_highlighted_label:
type: object # todo
type: object
additionalProperties: true # todo
has_graduated_access:
type: boolean
has_nft_avatar:
@ -43,7 +44,7 @@ components:
default: false
id:
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:
type: boolean
default: false
@ -53,7 +54,8 @@ components:
type: string
pattern: "^[0-9]+$"
business_account:
type: object # todo
type: object
additionalProperties: true # todo
super_follow_eligible:
type: boolean
default: false
@ -126,7 +128,8 @@ components:
description:
type: string
entities:
type: object # todo
type: object
additionalProperties: true # todo
fast_followers_count:
type: integer
favourites_count: