@gruncellka/porto-data 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/zones.schema.json",
4
+ "title": "Zones Schema",
5
+ "description": "Schema for shipping zones definitions",
6
+ "type": "object",
7
+ "required": [
8
+ "file_type",
9
+ "unit",
10
+ "zones"
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "type": "string",
15
+ "format": "uri",
16
+ "description": "JSON Schema URI reference"
17
+ },
18
+ "file_type": {
19
+ "type": "string",
20
+ "const": "zones",
21
+ "description": "File type identifier"
22
+ },
23
+ "unit": {
24
+ "type": "object",
25
+ "required": [
26
+ "country_code"
27
+ ],
28
+ "properties": {
29
+ "country_code": {
30
+ "type": "string",
31
+ "const": "ISO 3166-1 alpha-2"
32
+ }
33
+ },
34
+ "additionalProperties": false
35
+ },
36
+ "zones": {
37
+ "type": "array",
38
+ "minItems": 1,
39
+ "items": {
40
+ "type": "object",
41
+ "required": [
42
+ "id",
43
+ "name",
44
+ "description",
45
+ "country_codes"
46
+ ],
47
+ "properties": {
48
+ "id": {
49
+ "type": "string",
50
+ "pattern": "^[a-z0-9_]+$",
51
+ "description": "Zone ID"
52
+ },
53
+ "name": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "description": "Zone name"
57
+ },
58
+ "description": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "description": "Zone description"
62
+ },
63
+ "country_codes": {
64
+ "type": "array",
65
+ "minItems": 1,
66
+ "items": {
67
+ "type": "string",
68
+ "pattern": "^[A-Z]{2}$",
69
+ "description": "ISO 3166-1 alpha-2 country code"
70
+ },
71
+ "description": "List of country codes in this zone"
72
+ }
73
+ },
74
+ "additionalProperties": false
75
+ }
76
+ }
77
+ },
78
+ "additionalProperties": false
79
+ }