-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsonSchema.json
103 lines (103 loc) · 3.18 KB
/
jsonSchema.json
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
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "COVID-19 Cases India Data API Schema",
"required": [
"updatedAt",
"name"
],
"properties": {
"updatedAt": {
"$id": "#/properties/updatedAt",
"type": "string",
"format": "date-time",
"description": "Time when the stats are last updated should follow ISO8601 format",
"examples": [
"2020-04-15T00:00:00Z"
]
},
"name": {
"$id": "#/properties/name",
"type": "string",
"description": "country name",
"examples": [
"India"
],
"pattern": "^([^\\s]+(\\s)*)+$"
},
"cases": {
"$id": "#/properties/cases",
"type": "object",
"description": "Number of COVID-19 cases",
"default": null,
"required": [],
"properties": {
"active": {
"id": "#/properties/cases/properties/active",
"type": "integer",
"default": null,
"description": "Number of active cases",
"examples": ["123"],
"format": "int32"
},
"cured": {
"id": "#/properties/cases/properties/cured",
"type": "integer",
"default": null,
"description": "Number of cured or discharged cases",
"examples": ["100"],
"format": "int32"
},
"deaths": {
"id": "#/properties/cases/properties/deaths",
"type": "integer",
"default": null,
"description": "Number of deaths",
"examples": ["10"],
"format": "int32"
},
"migrated": {
"id": "#/properties/cases/properties/migrated",
"type": "integer",
"default": null,
"description": "Number of migrated cases",
"examples": ["1"],
"format": "int32"
},
"total": {
"id": "#/properties/cases/properties/total",
"type": "integer",
"default": null,
"description": "Total number of all COVID-19 cases",
"examples": ["234"],
"format": "int32"
}
}
},
"states": {
"$id": "#/properties/states",
"type": "array",
"title": "States data",
"default": null,
"items": {
"$id": "#/properties/states/items",
"type": "object",
"title": "State data",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Name of the state",
"example": "Andhra Pradesh",
"pattern": "^([^\\s]+(\\s)*)+$"
},
"cases": {
"$ref": "#/properties/cases"
}
}
}
}
}
}