-
Notifications
You must be signed in to change notification settings - Fork 0
/
Human.definition.yaml
453 lines (453 loc) · 15.4 KB
/
Human.definition.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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
definitions:
# Object used when listing one item
Human_response:
properties:
code:
type: "integer"
format: "int32"
example: 200
message:
type: "string"
example: "successful operation"
data:
type: "object"
$ref: "#/definitions/Human"
# Object used when listing multiple items
Human_collection:
properties:
code:
type: "integer"
format: "int32"
example: 200
message:
type: "string"
example: "successful operation"
data:
type: "array"
items:
$ref: "#/definitions/Human"
# Object used when creating an item
Human_response_created:
properties:
code:
type: "integer"
format: "int32"
example: 201
message:
type: "string"
example: "Created"
id:
type: "string"
example: 5c0fb100ec2339ed5bea6303
data:
$ref: "#/definitions/Human"
# Object used when creating an item
Human_response_updated:
properties:
code:
type: "integer"
format: "int32"
example: 200
message:
type: "string"
example: "successful operation"
id:
type: "string"
example: 5c0fb100ec2339ed5bea6303
data:
$ref: "#/definitions/Human"
Human:
required: ["first_name", "last_name"] # "ssn", "gender","sexual_orientation"
properties:
_id:
type: "string"
description: The Human identifier
example: "5c78a060c15bca840749e44b"
readOnly: true
x-ui:
grid:
hide: false
label: _id
width: "0"
form:
hide: true
label: _id
name:
description: "Name"
type: "string"
readOnly: true
x-editable: false
x-virtual: true
x-ui:
grid:
hide: true
label: name
width: "300"
form:
hide: false
label: name
first_name:
description: "First Name"
type: "string"
example: "Thomas"
minLength: 2
x-ui:
grid:
hide: false
label: First name
width: "120"
form:
hide: false
label: First name
last_name:
description: "Last Name"
type: "string"
example: "Issac"
minLength: 2
x-ui:
grid:
hide: false
label: Last name
width: "120"
form:
hide: false
label: Last name
user:
description: "System Account associated to this Human"
type: "string"
example: "5c78a060c15bca840749e44b"
x-ui:
collection-link: User
collection-link-value: userId
collection-link-label: username
grid:
hide: false
label: User
width: "120"
form:
type: combobox # select, combobox, text, radio, checkbox, switch, textarea, autocomplete
hide: false
label: User
selection-limit: 1
nationality:
description: "Nationality"
type: "string"
example: "American"
enum: ["Afghan", "Albanian", "Algerian", "American", "Andorran", "Angolan", "Antiguans", "Argentinean", "Armenian", "Australian", "Austrian", "Azerbaijani", "Bahamian", "Bahraini", "Bangladeshi", "Barbadian", "Barbudans", "Batswana", "Belarusian", "Belgian", "Belizean", "Beninese", "Bhutanese", "Bolivian", "Bosnian", "Brazilian", "British", "Bruneian", "Bulgarian", "Burkinabe", "Burmese", "Burundian", "Cambodian", "Cameroonian", "Canadian", "Cape Verdean", "Central African", "Chadian", "Chilean", "Chinese", "Colombian", "Comoran", "Congolese", "Costa Rican", "Croatian", "Cuban", "Cypriot", "Czech", "Danish", "Djibouti", "Dominican", "Dutch", "East Timorese", "Ecuadorean", "Egyptian", "Emirian", "Equatorial Guinean", "Eritrean", "Estonian", "Ethiopian", "Fijian", "Filipino", "Finnish", "French", "Gabonese", "Gambian", "Georgian", "German", "Ghanaian", "Greek", "Grenadian", "Guatemalan", "Guinea-Bissauan", "Guinean", "Guyanese", "Haitian", "Herzegovinian", "Honduran", "Hungarian", "I-Kiribati", "Icelander", "Indian", "Indonesian", "Iranian", "Iraqi", "Irish", "Israeli", "Italian", "Ivorian", "Jamaican", "Japanese", "Jordanian", "Kazakhstani", "Kenyan", "Kittian and Nevisian", "Kuwaiti", "Kyrgyz", "Laotian", "Latvian", "Lebanese", "Liberian", "Libyan", "Liechtensteiner", "Lithuanian", "Luxembourger", "Macedonian", "Malagasy", "Malawian", "Malaysian", "Maldivan", "Malian", "Maltese", "Marshallese", "Mauritanian", "Mauritian", "Mexican", "Micronesian", "Moldovan", "Monacan", "Mongolian", "Moroccan", "Mosotho", "Motswana", "Mozambican", "Namibian", "Nauruan", "Nepalese", "New Zealander", "Nicaraguan", "Nigerian", "Nigerien", "North Korean", "Northern Irish", "Norwegian", "Omani", "Pakistani", "Palauan", "Panamanian", "Papua New Guinean", "Paraguayan", "Peruvian", "Polish", "Portuguese", "Qatari", "Romanian", "Russian", "Rwandan", "Saint Lucian", "Salvadoran", "Samoan", "San Marinese", "Sao Tomean", "Saudi", "Scottish", "Senegalese", "Serbian", "Seychellois", "Sierra Leonean", "Singaporean", "Slovakian", "Slovenian", "Solomon Islander", "Somali", "South African", "South Korean", "Spanish", "Sri Lankan", "Sudanese", "Surinamer", "Swazi", "Swedish", "Swiss", "Syrian", "Taiwanese", "Tajik", "Tanzanian", "Thai", "Togolese", "Tongan", "Trinidadian or Tobagonian", "Tunisian", "Turkish", "Tuvaluan", "Ugandan", "Ukrainian", "Uruguayan", "Uzbekistani", "Venezuelan", "Vietnamese", "Welsh", "Yemenite", "Zambian", "Zimbabwean"]
x-ui:
grid:
hide: false
label: Nationality
width: "100"
form:
type: select
hide: false
label: Nationality
gender:
description: "Human Gender"
type: "string"
enum: ["Male","Female","Female to Male","Male to Female","In Transition","Other","Unknown"]
example: "Male"
default: "Male"
x-ui:
grid:
hide: true
label: Gender
width: "100"
form:
type: select # select, combobox, text, radio, checkbox, switch, textarea, autocomplete
hide: false
label: Gender
options: ["Male","Female","Female to Male","Male to Female","In Transition","Other","Unknown"]
selection-limit: 1
sexual_orientation:
description: "Sexual Orientation"
type: "string"
enum: ["Male","Female","Heterosexual/Straight","Gay/Lesbian","Other","Prefer Not to Answer","Unknown"]
example: "Heterosexual/Straight"
default: "Heterosexual/Straight"
x-ui:
grid:
hide: false
label: Sexual Orientation
width: "100"
form:
type: select # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time
hide: false
label: Sexual Orientation
options: ["Male","Female","Heterosexual/Straight","Gay/Lesbian","Other","Prefer Not to Answer","Unknown"]
selection-limit: 1
birthDate:
description: "Birth Date"
type: "string"
format: "date"
#nullable: true
example: "2017-07-21"
x-ui:
grid:
hide: true
label: Birth Date
width: "120"
form:
type: date # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time
hide: false
label: Birth Date
deathDate:
description: "Death Date"
type: "string"
format: "date"
#nullable: true
example: "2017-07-21"
x-ui:
grid:
hide: true
label: Death Date
width: "120"
form:
type: date # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time
hide: false
label: Death Date
ssn:
description: "Social Security Number"
type: "string"
format: ssn
example: "000-00-0000"
x-ui:
grid:
hide: false
label: SSN
width: "100"
form:
hide: false
label: SSN
photo:
description: "Photo - It can be the path of a file on CDN or a base64 encoded file. If you provide a base64 image hash it will be saved as file on CDN."
type: "string"
format: "base64"
example: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/sdf........"
x-ui:
grid:
hide: true
label: Photo
width: "120"
form:
type: base64
hide: false
label: Photo
accept: "image/png, image/jpeg"
file-size: 0.5
media-type: avatar # avatar, image, document
signature:
description: "Signature - It can be the path of a file on CDN or a base64 encoded file. If you provide a base64 image hash it will be saved as file on CDN."
type: "string"
format: "base64"
example: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/sdf........"
x-ui:
grid:
hide: true
label: Signature
width: "120"
form:
type: base64
hide: false
label: Signature
accept: "image/png, image/jpeg"
file-size: 4
media-type: image # avatar, image, document
radio_group:
description: "Radio group field example"
type: "string"
x-ui:
grid:
hide: true
label: Radio group
width: "100"
form:
type: radio_group # select, combobox, text, radio, checkbox, switch, textarea, autocomplete
hide: false
label: Radio group
options:
- label: "label 1"
value: "value 1"
- label: "label 2"
value: "value 2"
- label: "label 3"
value: "value 3"
- label: "label 4"
value: "value 4"
checkbox_group:
description: "Checkbox group field example"
type: "string"
example: "Male"
default: "Male"
x-ui:
grid:
hide: true
label: Checkbox group
width: "100"
form:
type: checkbox_group # select, combobox, text, radio, checkbox, switch, textarea, autocomplete
hide: false
label: Checkbox group
options:
- label: "label 1"
value: "value 1"
- label: "label 2"
value: "value 2"
- label: "label 3"
value: "value 3"
- label: "label 4"
value: "value 4"
email:
description: "Email Addresses"
type: "array"
items:
$ref: "#/definitions/email"
default: []
x-ui:
grid:
hide: true
label: Email Address
width: "120"
form:
type: grid # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time, grid
hide: false
label: Email Address
isSchema: true
address:
description: "Addresses"
type: "array"
items:
$ref: "#/definitions/address"
default: []
x-ui:
grid:
hide: true
label: Address
width: "120"
form:
type: grid # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time, grid
hide: false
label: Address
isSchema: true
phone:
description: "Phones"
type: "array"
items:
$ref: "#/definitions/phone"
#default: []
x-ui:
grid:
hide: true
label: Phone
width: "120"
form:
type: grid # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time, grid
hide: false
label: Phone
isSchema: true
memo:
description: "Memo notes"
type: "array"
items:
$ref: "#/definitions/memo"
#default: []
x-ui:
grid:
hide: true
label: Memo
width: "120"
form:
type: grid # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time, grid
hide: false
label: Memo
isSchema: true
file:
description: "File attachments"
type: "array"
items:
$ref: "#/definitions/file"
#default: []
x-uploader: true
x-ui:
grid:
hide: true
label: Files
width: "120"
form:
type: grid # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time, grid
hide: false
label: Associated Files
isSchema: true
createdBy:
description: "Created By"
type: "string"
example: "5c78a060c15bca840749e44b"
readOnly: true
x-editable: false
x-ui:
collection-link: Human
collection-link-value: _id
collection-link-label: name
grid:
hide: false
label: Created By
width: 120
form:
type: combobox # select, combobox, text, radio, checkbox, switch, textarea, autocomplete
hide: false
label: Created By
selection-limit: 1
createdAt:
description: "Created At"
type: "string"
format: "date-time"
#nullable: true
example: "2017-07-21"
readOnly: true
x-editable: false
x-ui:
grid:
hide: false
label: Created At
width: 120
form:
type: date-time # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time, date-time
hide: false
label: Created At
updatedBy:
description: "Updated By"
type: "string"
example: "5c78a060c15bca840749e44b"
readOnly: true
x-editable: false
x-ui:
collection-link: Human
collection-link-value: _id
collection-link-label: name
grid:
hide: false
label: Updated By
width: 120
form:
type: combobox # select, combobox, text, radio, checkbox, switch, textarea, autocomplete
hide: false
label: Updated By
selection-limit: 1
updatedAt:
description: "Updated At"
type: "string"
format: "date-time"
#nullable: true
example: "2017-07-21"
readOnly: true
x-editable: false
x-ui:
grid:
hide: false
label: Updated At
width: 120
form:
type: date-time # select, combobox, text, radio, checkbox, switch, textarea, autocomplete, date, time, date-time
hide: false
label: Updated At