-
Notifications
You must be signed in to change notification settings - Fork 17
/
ExampleAPI.yaml
157 lines (157 loc) · 3.68 KB
/
ExampleAPI.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
---
openapi: 3.0.0
info:
title: Registration Building Block API
description: Registration Building Block API
contact:
email: [email protected]
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0-oas3-oas3
servers:
- url: https://virtserver.swaggerhub.com/DigitalImpactAllianc/Registration/1.0.0
tags:
- name: admins
description: Secured Admin-only calls
- name: developers
description: Operations available to regular developers
paths:
/facility:
get:
tags:
- developers
summary: returns data about a particular facility
description: |
Pass in the ID of the facility and it will return all information about that facility
operationId: getFacility
parameters:
- name: facilityId
in: query
description: pass the unique identifier of the facility
required: true
style: form
explode: true
schema:
type: integer
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
type: object
items:
$ref: '#/components/schemas/Facility'
"404":
description: facility not found
post:
tags:
- admins
summary: adds a facility
description: Adds a facility to the system
operationId: addFacility
requestBody:
description: Inventory item to add
content:
application/json:
schema:
$ref: '#/components/schemas/Facility'
responses:
"201":
description: item created
"400":
description: invalid input, object invalid
"409":
description: an existing item already exists
components:
schemas:
Person:
required:
- birthDate
- firstName
- governmentId
- id
- mobileNumber
- surname
type: object
properties:
id:
type: integer
format: int64
surname:
type: string
firstName:
type: string
birthDate:
type: string
format: date
example: 2016-08-29
mobileNumber:
type: string
example: +1(555)555-5555
governmentId:
type: string
description: Government Issued ID Number
example: A0244251
program:
$ref: '#/components/schemas/Program'
Program:
required:
- description
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
example: Vaccination Outreach Program
description:
type: string
contact:
type: string
example: Hani Eskandar
Facility:
required:
- facilityType
- name
type: object
properties:
id:
type: integer
format: int64
name:
type: string
example: Kigali Central Hospital
facilityType:
type: string
example: Hospital
enum:
- Hospital
- School
location:
$ref: '#/components/schemas/Location'
Location:
required:
- latitude
- longitude
type: object
properties:
country:
type: string
example: Rwanda
city:
type: string
example: Kigali
latitude:
type: number
format: float
longitude:
type: number
format: float
securitySchemes:
basicAuth:
type: http
scheme: basic