mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 23:50:26 +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
70
src/openapi/schemas/instruction.yaml
Normal file
70
src/openapi/schemas/instruction.yaml
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
|
||||
paths: {}
|
||||
components:
|
||||
schemas:
|
||||
InstructionUnion:
|
||||
oneOf:
|
||||
- $ref: "#/components/schemas/TimelineAddEntries"
|
||||
- $ref: "#/components/schemas/TimelineClearCache"
|
||||
- $ref: "#/components/schemas/TimelinePinEntry"
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping": # deprecated
|
||||
TimelineAddEntries: "#/components/schemas/TimelineAddEntries"
|
||||
TimelineClearCache: "#/components/schemas/TimelineClearCache"
|
||||
TimelinePinEntry: "#/components/schemas/TimelinePinEntry"
|
||||
|
||||
InstructionType:
|
||||
type: string
|
||||
enum: [TimelineAddEntries, TimelineClearCache, TimelinePinEntry]
|
||||
|
||||
TimelineAddEntries:
|
||||
required:
|
||||
- type
|
||||
- entries
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
$ref: "#/components/schemas/InstructionType" # TimelineAddEntries
|
||||
entries:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/TimelineAddEntry"
|
||||
|
||||
TimelineClearCache:
|
||||
required:
|
||||
- type
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
$ref: "#/components/schemas/InstructionType" # TimelineClearCache
|
||||
|
||||
TimelinePinEntry:
|
||||
required:
|
||||
- type
|
||||
- entry
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
$ref: "#/components/schemas/InstructionType" # TimelinePinEntry
|
||||
entry:
|
||||
$ref: "#/components/schemas/TimelineAddEntry"
|
||||
|
||||
TimelineAddEntry:
|
||||
required:
|
||||
- "content"
|
||||
- "entryId"
|
||||
- "sortIndex"
|
||||
properties:
|
||||
content:
|
||||
$ref: "./content.yaml#/components/schemas/ContentUnion"
|
||||
entryId:
|
||||
type: string
|
||||
pattern: '^[a-z\-]+[0-9]+$'
|
||||
sortIndex:
|
||||
type: string
|
||||
pattern: "[0-9]+$"
|
||||
Loading…
Add table
Add a link
Reference in a new issue