forked from jharmn/api-standards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovince.json
34 lines (34 loc) · 1.25 KB
/
province.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
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "province",
"description": "An ISO 3166-2 based definition for state or province. Useful for statistical, market region or geolocation purposes.",
"properties": {
"province_code": {
"type": "string",
"description": "State or province code, as defined in ISO 3166-2. For example, US-CA, CN-11, GB-CAM, and so on.",
"maxLength": 6,
"minLength": 5,
"pattern": "^[A-Z]{2}-([A-Z]{2,3}|[0-9]{2,3})$"
},
"country_code": {
"$ref": "country_code.json"
},
"local_name": {
"type": "string",
"description": "Local province name. For example, California, Northern Ireland, 東京都, 北京, Москва́, and so on."
},
"latin_name": {
"type": "string",
"description": "Optional Latin or international province name, if local name is in non-Latin script. For example, `Tokyo` for the local_name `東京都`, or Beijing for `北京` for Beijing, Tianjin, or Moscow for `Москва́` and so on."
},
"abbreviation": {
"type": "string",
"description": "Abbreviation, if required. For example, `CA` for California."
}
},
"required": [
"province_code",
"country_code"
]
}