-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi.yaml
92 lines (92 loc) · 2.11 KB
/
openapi.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
openapi: "3.0.2"
info:
title: Census API
description: API for the Census backend
version: 1.0.0
paths:
/:
get:
parameters:
- $ref: '#/components/parameters/area'
- name: floor
in: query
allowEmptyValue: true
schema:
type: integer
enum: [1, 2]
responses:
'400':
$ref: '#/components/responses/400Error'
'500':
description: internal server error
'200':
description: request handled successfully
post:
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Snapshot'
responses:
'400':
$ref: '#/components/responses/400Error'
'500':
description: internal server error
'200':
description: request handled successfully
/history:
get:
parameters:
- $ref: '#/components/parameters/area'
responses:
'400':
$ref: '#/components/responses/400Error'
'500':
description: internal server error
'200':
description: request handled successfully
post:
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Snapshot'
responses:
'400':
$ref: '#/components/responses/400Error'
'500':
description: internal server error
'303':
description: see other (redirect to home)
components:
parameters:
area:
name: area
in: query
schema:
type: string
responses:
400Error:
description: Invalid request
content:
text/plain:
schema:
title: Bad input
type: string
schemas:
Snapshot:
type: object
properties:
area:
type: string
people:
type: integer
id:
type: integer
ts:
type: integer
required:
- area
- people