Skip to content

Commit

Permalink
CODV2API (#1): created schema/CODV2API/v1.0/location-item-cod-ab.eng.…
Browse files Browse the repository at this point in the history
…schema.json
  • Loading branch information
fititnt committed May 5, 2021
1 parent 6388103 commit a7c9f42
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 1 deletion.
5 changes: 5 additions & 0 deletions eng.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ open industry standard to document REST APIs.**
- [BR](#br)
- [portais-ckan-brasil - Brazilian Open Data portals](#portais-ckan-brasil---brazilian-open-data-portals)
- [portais-ckan-brasil-por](#portais-ckan-brasil-por)
- [Schema](#schema)
- [Systema](#systema)
- [OpenAPI](#openapi)
- [Online editors](#online-editors)
Expand Down Expand Up @@ -72,6 +73,10 @@ open industry standard to document REST APIs.**
- **OpenAPI File**: [api/BR/portais-ckan-brasil/por/openapi.yaml](api/BR/portais-ckan-brasil/por/openapi.yaml)
- **Preview/Execute**: <https://editor.swagger.io/?url=https://hapi.etica.ai/api/BR/portais-ckan-brasil/por/openapi.yaml>

## Schema

Please see repository at <https://github.com/HXL-CPLP/Auxilium-Humanitarium-API/tree/main/schema>.

## Systema

### OpenAPI
Expand Down
6 changes: 6 additions & 0 deletions por.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ documentar APIs REST.**
- [BR](#br)
- [portais-ckan-brasil - Portais de dados abertos do Brasil](#portais-ckan-brasil---portais-de-dados-abertos-do-brasil)
- [portais-ckan-brasil-por](#portais-ckan-brasil-por)
- [Schema](#schema)
- [Systema](#systema)
- [OpenAPI](#openapi)
- [Editores online](#editores-online)
Expand Down Expand Up @@ -69,6 +70,11 @@ documentar APIs REST.**
- **Arquivo OpenAPI**: [api/BR/portais-ckan-brasil/openapi.yaml](api/BR/portais-ckan-brasil/por/openapi.yaml)
- **Pré-visualizar/executar online**: <https://editor.swagger.io/?url=https://hapi.etica.ai/api/BR/portais-ckan-brasil/por/openapi.yaml>


## Schema

Por favor, navege no repositório em <https://github.com/HXL-CPLP/Auxilium-Humanitarium-API/tree/main/schema>.

## Systema

### OpenAPI
Expand Down
7 changes: 6 additions & 1 deletion schema/CODV2API/v1.0/exemplum/location-item-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
],
"status": "OK",
"Total": 2,
"_unknow-key": "This will be ignored by the schema"
"_unknow-key": "Any field starting with _ is ignored by schema",
"_comment": {
"date": "2021-05-05T06:27:00Z",
"source": "Example item from https://beta.itos.uga.edu/CODV2API/api/v1/locations",
"note": "/locations uses location_iso; locations/HN01 uses iso_3"
}
}
14 changes: 14 additions & 0 deletions schema/CODV2API/v1.0/exemplum/location-item-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"location_name": "Atlantida",
"iso_3": "hnd",
"themes": [
"Administrative Boundary"
],
"status": "ok",
"total": 1,
"_comment": {
"date": "2021-05-05T06:27:00Z",
"source": "First item of https://beta.itos.uga.edu/CODV2API/api/v1/locations/HN01",
"note": "Here uses iso_3"
}
}
12 changes: 12 additions & 0 deletions schema/CODV2API/v1.0/exemplum/location-item-cod-ab-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"admin0Pcode": "sdn",
"admin0Name_ref": " Sudan",
"version": "Latest",
"valid_from": "2020-08-31T00:00:00",
"valid_to": "2021-08-31T00:00:00",
"comments": null,
"_comment": {
"date": "2021-05-05T06:38:00Z",
"source": "First item of https://beta.itos.uga.edu/CODV2API/api/v1/themes/cod-ab/locations/SDN"
}
}
67 changes: 67 additions & 0 deletions schema/CODV2API/v1.0/location-item-cod-ab.eng.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hapi.etica.ai/schema/CODV2API/v1.0/location-item-cod-ab.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/themes/cod-ab/locations/SDN (as 2021-05-05) \nJSON Schem specification here https://json-schema.org/ \nExample of online editor: https://www.jsonschemavalidator.net/",
"type": "object",
"required": [
"admin0Pcode",
"admin0Name_ref",
"version",
"valid_from",
"valid_to"
],
"additionalProperties": false,
"properties": {
"admin0Pcode": {
"description": "TODO: admin0Pcode description",
"type": "string",
"minLength": 3,
"maxLength": 3,
"example": "sdn"
},
"admin0Name_ref": {
"description": "TODO: admin0Name_ref description",
"type": "string",
"minLength": 3,
"maxLength": 128,
"example": "Sudan"
},
"version": {
"description": "TODO: version description",
"type": "string",
"example": "Latest"
},
"Total": {
"description": "TODO: Total description",
"type": "integer"
},
"valid_from": {
"description": "TODO: valid_from description",
"type": "string",
"format": "date-time"
},
"valid_to": {
"description": "TODO: valid_to description",
"type": "string",
"format": "date-time"
},
"comments": {
"description": "TODO: comments description",
"type": [
"string",
"null"
]
}
},
"patternProperties": {
"^_": {
"type": [
"string",
"array",
"object"
],
"description": "Properties starting with Properties are tolerated, since we're enforcing additionalProperties=false"
}
}
}

0 comments on commit a7c9f42

Please sign in to comment.