forked from jharmn/api-standards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phone.json
30 lines (30 loc) · 1.2 KB
/
phone.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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Phone number. Must be represented in its canonical international format, as defined by the E.164 numbering plan.",
"type": "object",
"title": "Phone type",
"properties": {
"country_code": {
"type": "string",
"description": "Country calling code (CC) as defined by E.164. Combined length of CC+national must not be more than 15 digits. ",
"minLength": 1,
"maxLength": 3,
"pattern": "^[0-9]{1,3}?$"
},
"national_number": {
"type": "string",
"description": "National number as defined by E.164. Combined length of CC+national must not be more than 15 digits. National number consists of National Destination Code (NDC) and Subscriber Number (SN).",
"minLength": 1,
"maxLength": 14,
"pattern": "^[0-9]{1,14}?$"
},
"extension_number": {
"type": "string",
"description": "Extension number.",
"minLength": 1,
"maxLength": 15,
"pattern": "^[0-9]{1,15}?$"
}
},
"required" : ["country_code", "national_number"]
}