Commit fa17fdfd authored by Krit Punpreuk's avatar Krit Punpreuk

add json schema with badic condition and example

parent fd4fe1c7
Pipeline #331 canceled with stages
[
{
"year": 2023,
"weeknum": 26,
"new_case": 859,
"total_case": 28504,
"new_case_excludeabroad": 859,
"total_case_excludeabroad": 28504,
"new_recovered": 0,
"total_recovered": 0,
"new_death": 43,
"total_death": 702,
"case_foreign": 0,
"case_prison": 3,
"case_walkin": 856,
"case_new_prev": 851,
"case_new_diff": 8,
"death_new_prev": 36,
"death_new_diff": 7,
"update_date": "2023-07-02 13:48:13"
}
]
\ No newline at end of file
This diff is collapsed.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://covid19.ddc.moph.go.th/api/Cases/today-cases-all",
"description": "Schema for covid19-moph-api",
"type": "array",
"items": {
"type": "object",
"properties": {
"year": {
"type": "number"
},
"weeknum": {
"type": "number"
},
"new_case": {
"type": "number"
},
"total_case": {
"type": "number"
},
"new_case_excludeabroad": {
"type": "number"
},
"total_case_excludeabroad": {
"type": "number"
},
"new_recovered": {
"type": "number"
},
"total_recovered": {
"type": "number"
},
"new_death": {
"type": "number"
},
"total_death": {
"type": "number"
},
"case_foreign": {
"type": "number"
},
"case_prison": {
"type": "number"
},
"case_walkin": {
"type": "number"
},
"case_new_prev": {
"type": "number"
},
"case_new_diff": {
"type": "number"
},
"death_new_prev": {
"type": "number"
},
"death_new_diff": {
"type": "number"
},
"update_date": {
"type": "string"
}
},
"required": [
"year",
"weeknum",
"new_case",
"total_case",
"new_case_excludeabroad",
"total_case_excludeabroad",
"new_recovered",
"total_recovered",
"new_death",
"total_death",
"case_foreign",
"case_prison",
"case_walkin",
"case_new_prev",
"case_new_diff",
"death_new_prev",
"death_new_diff",
"update_date"
]
},
"minItems": 1,
"maxItems": 1,
"additionalProperties": true,
}
\ No newline at end of file
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://covid19.ddc.moph.go.th/api/Cases/today-cases-by-provinces",
"description": "Schema for covid19-moph-api",
"type": "array",
"items": {
"type": "object",
"properties": {
"year": {
"type": "number"
},
"weeknum": {
"type": "number"
},
"province": {
"type": "string"
},
"new_case": {
"type": "number"
},
"total_case": {
"type": "number"
},
"new_case_excludeabroad": {
"type": "number"
},
"total_case_excludeabroad": {
"type": "number"
},
"new_death": {
"type": "number"
},
"total_death": {
"type": "number"
},
"update_date": {
"type": "string"
}
},
"required": [
"year",
"weeknum",
"province",
"new_case",
"total_case",
"new_case_excludeabroad",
"total_case_excludeabroad",
"new_death",
"total_death",
"update_date"
]
},
"minItems": 79,
"additionalProperties": true,
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment