Skip to content

Commit

Permalink
CODV2API (#1): now schema is explicitly in English; schema/CODV2API/v…
Browse files Browse the repository at this point in the history
…1.0/location-item.schema.json
  • Loading branch information
fititnt committed May 5, 2021
1 parent 73f2a43 commit 6388103
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 8 deletions.
3 changes: 2 additions & 1 deletion schema/CODV2API/v1.0/exemplum/location-item-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"Population Statistics"
],
"status": "OK",
"Total": 2
"Total": 2,
"_unknow-key": "This will be ignored by the schema"
}
58 changes: 58 additions & 0 deletions schema/CODV2API/v1.0/location-item.eng.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hapi.etica.ai/schema/CODV2API/v1.0/location-item.eng.schema.json",
"title": "UN/CODV2API v1.0 location-item",
"description": "JSON schema (English descriptions) from items of https://beta.itos.uga.edu/CODV2API/api/v1/locations (as 2021-05-05) \nJSON Schem specification here https://json-schema.org/ \nExample of online editor: https://www.jsonschemavalidator.net/",
"type": "object",
"required": [
"location_iso",
"location_name",
"Themes",
"Total"
],
"additionalProperties": false,
"properties": {
"location_iso": {
"description": "TODO: location_iso description",
"type": "string",
"minLength": 3,
"maxLength": 3
},
"location_name": {
"description": "TODO: location_name description",
"type": "string",
"minLength": 3,
"maxLength": 128
},
"Themes": {
"description": "TODO: location_iso description",
"$comment": "How to use enums: https://json-schema.org/understanding-json-schema/reference/generic.html?highlight=enum#enumerated-values",
"type": "array",
"items": {
"type": "string",
"enum": [
"Administrative Boundary",
"Population Statistics"
]
}
},
"Total": {
"description": "TODO: Total description",
"type": "integer"
},
"status": {
"description": "TODO: status description",
"type": "string"
}
},
"patternProperties": {
"^_": {
"type": [
"string",
"array",
"object"
],
"description": "Properties starting with Properties are tolerated, since we're enforcing additionalProperties=false"
}
}
}
7 changes: 0 additions & 7 deletions schema/CODV2API/v1.0/location-item.schema.json

This file was deleted.

0 comments on commit 6388103

Please sign in to comment.