-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
397 lines (390 loc) · 11.4 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
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
openapi: 3.0.3
info:
title: ICM BACKEND API DOCS
description: This is the documentation of the apis in ICM Backend to be used by frontend developers
termsOfService: http://example.com/terms/
contact:
name: Assan Danquah Bernard
url: http://www.example.com/support
email: bernardassan100@gamil.com
license:
name: GNU GPL 3.0
url: https://www.gnu.org/licenses/gpl-3.0.en.html
version: 1.0.0
servers:
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/Animosusoft/ICM/1.0.0
- url: http://{domain_name}:{port}/{basePath}
description: The primary icm backend server
variables:
domain_name:
# note! no enum here means it is an open value
default: localhost
description: this value is assigned by the service provider, in this example `gigantic-server.com`
port:
enum:
- '9000'
- '3000'
default: '9000'
basePath:
# open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
default: api/v1
tags:
- name: "members"
description: "Everything about the church members"
externalDocs:
description: "Find out more"
url: "http://swagger.io"
- name: "visitors"
description: "All about the church visitors"
- name: "Adiministrator"
description: "Operations about user"
externalDocs:
description: "Find out more about our store"
url: "http://swagger.io"
paths:
/members:
get:
tags:
- members
summary: Display all the church members info we have stored
description: Returns all members from the system that the user has access to
parameters: []
responses:
'200':
description: Successfully retrieved the list of church members.
content:
application/json:
schema:
$ref: '#/components/schemas/member'
'400':
description: Invalid status value
post:
tags:
- members
summary: Add a new member to the church membership
description: Add a new members to the system
parameters:
- in: query
name: body
description: Church member object that needs to be added to the db
required: true
schema:
$ref: '#/components/schemas/member'
responses:
'201':
description: Successfully added a new church members.
'405':
description: Invalid input
/members/{membership_id}:
get:
tags:
- members
summary: Find member by membership id
description: Returns the member who matches the membership_id in the url
operationId: get_member_by_id
parameters:
- name: membership_id
in: path
description: The membership_id of the member to return
required: true
schema:
type: string
responses:
'200':
description: Successfully retrieved the member
content:
application/json:
schema:
$ref: '#/components/schemas/member'
'400':
description: Invalid membership_id supplied
'404':
description: church member not found
/members/{mothers_name}/mother:
get:
tags:
- members
summary: Find member by mothers_name
description: Returns the member who's mothers name matches that in the url
operationId: get_member_by_mothers_name
parameters:
- name: mothers_name
in: path
description: The mothers_name of the member to return
required: true
schema:
type: string
responses:
'200':
description: Successfully retrieved the member
content:
application/json:
schema:
$ref: '#/components/schemas/member'
'400':
description: Invalid others_name supplied
'404':
description: Mother member in church not found
/members/{fathers_name}/father:
get:
tags:
- members
summary: Find member by fathers_name
description: Returns the members who's fathers name matches that in the url
operationId: get_member_by_father_name
parameters:
- name: fathers_name
in: path
description: The fathers_name of the member to return
required: true
schema:
type: string
responses:
'200':
description: Successfully retrieved the member
content:
application/json:
schema:
$ref: '#/components/schemas/member'
'400':
description: Invalid fathers_name supplied
'404':
description: Father not found in the church
/members/gender/females:
get:
tags:
- members
summary: Find member by gender female
description: Returns all female members of the church
responses:
'200':
description: Successfully retrieved female members in the church
content:
application/json:
schema:
$ref: '#/components/schemas/member'
'400':
description: Invalid Request
/members/gender/males:
get:
tags:
- members
summary: Find member by gender male
description: Returns all male members of the church
responses:
'200':
description: Successfully retrieved male members in the church
content:
application/json:
schema:
$ref: '#/components/schemas/member'
'400':
description: Invalid Request
/members/{occupation}/occupations:
get:
tags:
- members
summary: Find all members who are involved with a paticular occupation
description: Returns members with the same occupation
parameters:
- name : occupation
in: path
description: The name of the occupation to retrieve member by
required: true
schema:
type: string
responses:
'200':
description: Successfully retrieved members
content:
application/json:
schema:
$ref: '#/components/schemas/member'
'400':
description: Invalid Request
'404':
description: Occupation not found in the church db
/members/{profession}/professions:
get:
tags:
- members
summary: Find all members who are involved with a paticular profession
description: Returns members with the same profession
parameters:
- name : profession
in: path
description: The name of the profession to retrieve member by
required: true
schema:
type: string
responses:
'200':
description: Successfully retrieved members
content:
application/json:
schema:
$ref: '#/components/schemas/member'
'400':
description: Invalid Request
'404':
description: Profession not found in the church db
components:
schemas:
GeneralError:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
member:
type: object
properties:
basic_information:
type: object
required:
- first_name
- middle_name
- last_name
- date_of_birth
- membership_id
- gender
properties:
first_name:
type: string
example: Bernard
middle_name:
type : string
example: Danquah
last_name:
type: string
example: Assan
date_of_birth:
type: string
format: date
example: 2000-12-12
languages_spoken:
type: array
items:
type: object
example:
- Spanish
- English
membership_id:
type: string
format: uuid
gender:
type: string
enum:
- Male
- Female
example: Male
contact_information:
type: object
properties:
residential_or_gps_address:
type: string
hometown:
type: string
postal_address:
type: string
place_of_birth:
type: string
nationality:
type: string
region:
type: string
number:
type : string
email:
type : string
family_information:
type: object
properties:
marital_status:
type: string
date_of_marriage:
type: string
format: date
name_of_spouse:
type: string
name_of_children:
type: string
mothers_name:
type: string
fathers_name:
type: string
next_of_kins:
type: string
educational_and_occupational_infomation:
type: object
properties:
student:
type: string
education_level:
type : string
instituition:
type: string
profession:
type: string
occupation:
type: string
current_place_of_work:
type: string
employment_status:
type: string
church_infomation:
type: object
properties:
date_accepted_in_church:
type: string
format: date
role:
type: string
authorized_by:
type: string
date_of_baptism:
type: string
format: date
place_of_baptism:
type: string
baptized_by:
type: string
date_of_conformation:
type: string
format: date
place_of_conformation:
type: string
previous_church_attended:
type: string
parameters:
skipParam:
name: skip
in: query
description: number of items to skip
required: true
schema:
type: integer
format: int32
limitParam:
name: limit
in: query
description: max records to return
required: true
schema:
type: integer
format: int32
responses:
NotFound:
description: Entity not found.
IllegalInput:
description: Illegal input for operation.
GeneralError:
description: General Error
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralError'