-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfestival-registry-schema.json
More file actions
138 lines (137 loc) · 4.57 KB
/
Copy pathfestival-registry-schema.json
File metadata and controls
138 lines (137 loc) · 4.57 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://data.cambeerfestival.app/festivals-schema.json",
"title": "Festivals Configuration Schema",
"description": "JSON Schema for Cambridge Beer Festival app configuration (data/festivals.json)",
"type": "object",
"required": ["festivals", "default_festival_id", "version", "last_updated"],
"properties": {
"festivals": {
"type": "array",
"description": "Array of festival entries",
"minItems": 1,
"items": {
"$ref": "#/definitions/festival"
}
},
"default_festival_id": {
"type": "string",
"description": "ID of the default festival to show on app launch",
"pattern": "^[a-z0-9-]+$",
"examples": ["cbf2025"]
},
"version": {
"type": "string",
"description": "Schema version (semver)",
"pattern": "^\\d+\\.\\d+\\.\\d+$",
"examples": ["1.0.0"]
},
"last_updated": {
"type": "string",
"description": "ISO 8601 timestamp of when the configuration was last updated",
"format": "date-time",
"examples": ["2025-11-29T00:00:00Z"]
}
},
"definitions": {
"festival": {
"type": "object",
"description": "A beer festival entry with metadata and data URLs",
"required": ["id", "name", "available_beverage_types", "data_base_url", "is_active"],
"properties": {
"id": {
"type": "string",
"description": "Unique festival identifier",
"pattern": "^[a-z0-9-]+$",
"examples": ["cbf2025", "cbfw2025"]
},
"name": {
"type": "string",
"description": "Full festival name",
"minLength": 1,
"examples": ["Cambridge Beer Festival 2025"]
},
"hashtag": {
"type": "string",
"description": "Social media hashtag",
"pattern": "^#[a-zA-Z0-9_]+$",
"examples": ["#cbf2025"]
},
"start_date": {
"type": "string",
"description": "Festival start date (ISO 8601 date)",
"format": "date",
"examples": ["2025-05-19"]
},
"end_date": {
"type": "string",
"description": "Festival end date (ISO 8601 date)",
"format": "date",
"examples": ["2025-05-24"]
},
"location": {
"type": "string",
"description": "Venue name and city",
"examples": ["Jesus Green, Cambridge"]
},
"address": {
"type": "string",
"description": "Full postal address",
"examples": ["Jesus Green, Cambridge CB5 8BA"]
},
"latitude": {
"type": "number",
"description": "Venue latitude",
"minimum": -90,
"maximum": 90,
"examples": [52.2119]
},
"longitude": {
"type": "number",
"description": "Venue longitude",
"minimum": -180,
"maximum": 180,
"examples": [0.1220]
},
"description": {
"type": "string",
"description": "Festival description",
"examples": ["The 53rd Cambridge Beer Festival..."]
},
"website_url": {
"type": "string",
"description": "Festival website URL",
"format": "uri",
"examples": ["https://www.cambridgebeerfestival.com"]
},
"hours": {
"type": "object",
"description": "Opening hours by day of the week",
"additionalProperties": {
"type": "string",
"pattern": "^\\d{2}:\\d{2} - \\d{2}:\\d{2}(, \\d{2}:\\d{2} - \\d{2}:\\d{2})*$"
},
"examples": [{"Monday": "17:00 - 22:00", "Tuesday": "12:00 - 22:00", "Wednesday": "12:00 - 15:00, 17:00 - 22:00"}]
},
"available_beverage_types": {
"type": "array",
"description": "List of beverage types available at this festival",
"minItems": 1,
"items": {
"type": "string",
"examples": ["beer", "cider", "perry", "mead", "wine", "international-beer", "low-no"]
}
},
"data_base_url": {
"type": "string",
"description": "Base URL for fetching beverage data. Can be absolute (https://...) or relative (/festivalId). Relative URLs are resolved against the base URL where festivals.json was fetched from.",
"examples": ["/cbf2025", "https://data.cambeerfestival.app/cbf2025"]
},
"is_active": {
"type": "boolean",
"description": "Whether this festival is currently active"
}
}
}
}
}