demarches-normaliennes/app/schemas/adresse-ban.json
Colin Darie 073656342e fix(api_address): support Adresse BAN without postcode
Des adresses n'ont pas de code postal (dans certains TOM par exemple).
On fallback sur un string vide plutôt que nil pour limiter les effets de bord.
2022-10-11 12:25:12 +02:00

39 lines
1 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://demarches-simplifiees.fr/adresse-ban.schema.json",
"title": "Adresse BAN",
"type": "object",
"properties": {
"properties": {
"type": "object",
"properties": {
"label": { "type": "string" },
"housenumber": { "type": "string" },
"name": { "type": "string" },
"postcode": { "type": "string" },
"citycode": { "type": "string" },
"city": { "type": "string" },
"district": { "type": "string" },
"context": { "type": "string" },
"type": {
"enum": ["housenumber", "street", "locality", "municipality"]
}
},
"required": ["label", "type", "name", "citycode", "city"]
},
"geometry": {
"type": "object",
"properties": {
"type": {
"const": "Point"
},
"coordinates": {
"type": "array",
"minItems": 2,
"maxItems": 2
}
}
}
},
"required": ["properties"]
}