-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.py
58 lines (54 loc) · 1.63 KB
/
schema.py
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
userschema = {
"type" : "object",
"properties" : {
"name" : {"type": "string"},
"email" : {"type": "string"},
"address" : {
"type": "object",
"properties" : {
"line1" : {"type": "string"},
"line2" : {"type": "string"},
"locality" : {"type": "string"},
"city" : {"type": "string"},
"state" : {"type": "string"},
"pin" : {"type": "string"},
},
"additionalProperties": False,
}
},
"required" : ["name", "email"],
"additionalProperties": False,
}
workerschema = {
"type" : "object",
"properties" : {
"name": {"type": "string"},
"username": {"type": "string"},
"age": {"type": "number"} ,
"gender": {"type": "string"},
"address": {
"type" : "object",
"properties" : {
"line1" : {"type": "string"},
"line2" : {"type": "string"},
"locality" : {"type": "string"},
"city" : {"type": "string"},
"state" : {"type": "string"},
"pin" : {"type": "string"},
},
"additionalProperties": False,
},
"mobile" : {"type": "string"},
"adhaar": {"type": "string"},
"jobtypes": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": True,
}
},
"additionalProperties": False,
"required" : ["name", "username", "age", "gender"]
}