forked from readme-micro-demo/service-backend-api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
oas.yaml
91 lines (91 loc) · 2.33 KB
/
oas.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
openapi: 3.0.0
info:
version: '1.0.1'
title: Hoot
license:
name: ISC
paths: {}
tags:
- name: Hoots
description: This endpoint is for individual Hoots.
- name: Timeline
description: This endpoint is for Hoot timelines.
servers:
- url: https://hoot.at/api
components:
parameters:
id:
name: id2
in: path
schema:
type: string
description: The id of the hoot you want!
required: true
example: 5c3e39af342143680d31775c
securitySchemes:
basicAuth:
type: http
scheme: basic
schemas:
HootPost:
type: object
required:
- post
properties:
post:
type: string
description: The under-280-character content you want to hoot
example: just setting up my hoot
maxLength: 280
ReplyToString:
type: object
properties:
replyto:
type: string
description: Optional id of the hoot being replied to
example: 5c3e39af342143680d31775c
NewHoot:
type: object
allOf:
- $ref: '#/components/schemas/HootPost'
- $ref: '#/components/schemas/ReplyToString'
AdditionalHootProperties:
type: object
properties:
_id:
type: string
description: The unique, auto-generated ID for the hoot
example: 5c3e39af342143680d31775c
createdAt:
type: string
format: date-time
likes:
type: array
description: An array containing usernames of the users that liked this hoot
items:
type: string
example: owlet
username:
type: string
example: owlbert
description: The username for the user that created this hoot
SmolHoot:
type: object
allOf:
- $ref: '#/components/schemas/AdditionalHootProperties'
- $ref: '#/components/schemas/HootPost'
- $ref: '#/components/schemas/ReplyToString'
ReplyToObject:
type: object
required:
- post
properties:
replyto:
type: object
$ref: '#/components/schemas/SmolHoot'
BigHoot:
type: object
allOf:
- $ref: '#/components/schemas/AdditionalHootProperties'
- $ref: '#/components/schemas/HootPost'
- $ref: '#/components/schemas/ReplyToObject'