-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathapi.yaml
99 lines (91 loc) · 2.32 KB
/
api.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
92
93
94
95
96
97
98
99
openapi: "3.0.0"
info:
title: "API Example"
version: "1.0"
paths:
/instant-date-time:
get:
summary: "GET instant date time"
parameters:
- $ref: "#/components/parameters/ListQueryParamExploded"
- $ref: "#/components/parameters/QueryParam"
responses:
200:
description: "successful operation"
headers:
Cache-Control:
$ref: "#/components/headers/CacheControl"
content:
application/vnd.custom.media+json:
schema:
$ref: "#/components/schemas/QueryResult"
components:
parameters:
ListQueryParamExploded:
name: "explode_list_query_param"
in: "query"
schema:
type: "array"
items:
type: "string"
format: "date-time"
example: "2016-01-27T10:52:46.406Z"
required: false
allowEmptyValue: false
QueryParam:
name: "query_param2"
in: "query"
schema:
type: "string"
format: "date-time"
example: "2016-01-27T10:52:46.406Z"
required: false
headers:
Location:
description: "The Location header indicates the URL of a newly created resource"
schema:
type: "string"
CacheControl:
description: "The RFC7234 Cache Control header"
schema:
type: "string"
example: "must-revalidate, max-age=5"
requestBodies:
PostBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/FirstModel"
PutBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/FirstModel"
schemas:
QueryResult:
type: "object"
required:
- "items"
properties:
items:
type: "array"
minItems: 0
items:
$ref: "#/components/schemas/FirstModel"
FirstModel:
type: "object"
properties:
date:
type: "string"
format: "date-time"
example: "2016-01-27T10:52:46.406Z"
extra_first_attr:
description: "The attribute 1 for model 1"
type: array
items:
type: "string"
format: "date-time"
example: "2016-01-27T10:52:46.406Z"
readOnly: true