1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 07:30:37 +01:00
twitter-openapi/dist/schemas/instruction.yaml
ふぁ 26908878c1
add builder
Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-04-18 09:23:53 +09:00

67 lines
1.7 KiB
YAML

components:
schemas:
InstructionType:
enum:
- TimelineAddEntries
- TimelineClearCache
- TimelinePinEntry
type: string
InstructionUnion:
discriminator:
mapping":
TimelineAddEntries: '#/components/schemas/TimelineAddEntries'
TimelineClearCache: '#/components/schemas/TimelineClearCache'
TimelinePinEntry: '#/components/schemas/TimelinePinEntry'
propertyName: type
oneOf:
- $ref: '#/components/schemas/TimelineAddEntries'
- $ref: '#/components/schemas/TimelineClearCache'
- $ref: '#/components/schemas/TimelinePinEntry'
TimelineAddEntries:
properties:
entries:
items:
$ref: '#/components/schemas/TimelineAddEntry'
type: array
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
- entries
TimelineAddEntry:
properties:
content:
$ref: ./content.yaml#/components/schemas/ContentUnion
entryId:
pattern: ^[a-z\-]+[0-9]+$
type: string
sortIndex:
pattern: '[0-9]+$'
type: string
required:
- content
- entryId
- sortIndex
TimelineClearCache:
properties:
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
TimelinePinEntry:
properties:
entry:
$ref: '#/components/schemas/TimelineAddEntry'
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
- entry
info:
title: Twitter OpenAPI
version: 0.0.1
openapi: 3.0.3
paths: {}