-
Notifications
You must be signed in to change notification settings - Fork 3
/
schema.json
115 lines (115 loc) · 3.68 KB
/
schema.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Primarie",
"description": "Reprezentarea unei primarii.",
"type": "object",
"additionalProperties": false,
"required": ["nume", "adresa", "contact"],
"properties": {
"nume": {
"description": "Denumirea primariei.",
"type": "string"
},
"adresa": {
"description": "Adresa primariei.",
"$ref": "#/definitions/adresa"
},
"contact": {
"description": "Modalitati de contact.",
"$ref": "#/definitions/contact"
}
},
"definitions": {
"teritoriu": {
"type": "object",
"required": ["nume"],
"properties": {
"nume": {
"type": "string"
}
}
},
"adresa": {
"type": "object",
"additionalProperties": false,
"required": ["localitate", "judet", "cod-postal", "tara"],
"properties": {
"strada": {
"description": "",
"type": "string"
},
"localitate": {
"allOf": [
{ "$ref": "#/definitions/teritoriu" }
],
"properties": {
"nume": {},
"siruta": {
"type": "integer",
"pattern": "^[0-9]{6}$"
}
},
"additionalProperties": false,
"required": ["siruta"]
},
"judet": {
"allOf": [
{ "$ref": "#/definitions/teritoriu" }
],
"properties": {
"nume": {}
},
"additionalProperties": false
},
"cod-postal": {
"description": "",
"type": "string",
"pattern": "^[0-9]{6}$"
},
"tara": {
"description": "",
"type": "string"
}
}
},
"contact": {
"type": "object",
"additionalProperties": false,
"required": ["telefon"],
"properties": {
"telefon": {
"description": "Numar de telefon.",
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"format": "^[0-9]{3,4}-[0-9]{6,7}$"
}
},
"fax": {
"description": "Numar de FAX.",
"type": "array",
"minItems": 0,
"items": {
"type": "string",
"pattern": "^[0-9]{3,4}-[0-9]{6,7}$"
}
},
"website": {
"description": "Adresa website.",
"type": "string",
"pattern": "^(https?):\/\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}.[^\\s]*$"
},
"email": {
"description": "Adrese de email.",
"type": "array",
"minItems": 0,
"items": {
"type": "string",
"pattern": "^[a-zA-Z0-9_\\.+-]+@[a-zA-Z0-9\\.-]+\\.[a-zA-Z0-9-.]{2,4}$"
}
}
}
}
}
}