@roastbook/open-coffee-schema 0.0.0-stage → 0.4.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,197 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.roastbook.coffee/common/common.schema.v0.3.0.json",
4
+ "title": "Open Coffee common definitions",
5
+ "description": "Building blocks shared by every Open Coffee dataset (coffee places, brew methods and equipment; roasters and beans later). Reference them by absolute $id plus a JSON pointer.",
6
+ "$defs": {
7
+ "id": {
8
+ "title": "Identifier",
9
+ "description": "Permanent, opaque identifier. Never reused, never derived from a name, never deleted. Lowercase letters, digits, dots, dashes and underscores; starts and ends with a letter or digit.",
10
+ "type": "string",
11
+ "pattern": "^[a-z0-9][a-z0-9_.-]*[a-z0-9]$",
12
+ "minLength": 3,
13
+ "maxLength": 64,
14
+ "examples": [
15
+ "cp-7k2m9x4qvd"
16
+ ]
17
+ },
18
+ "date": {
19
+ "title": "Date",
20
+ "description": "Calendar date, YYYY-MM-DD.",
21
+ "type": "string",
22
+ "format": "date"
23
+ },
24
+ "datetime": {
25
+ "title": "Timestamp",
26
+ "description": "RFC 3339 timestamp with time zone, for example 2026-11-05T14:00:00Z.",
27
+ "type": "string",
28
+ "format": "date-time"
29
+ },
30
+ "url": {
31
+ "title": "URL",
32
+ "description": "Absolute http or https address. Letters outside ASCII, such as umlauts in the host or path, may be written as they are (an IRI, for example https://kaffee-münchen.de/über-uns). The scheme is not case-sensitive.",
33
+ "type": "string",
34
+ "format": "iri",
35
+ "pattern": "^[Hh][Tt][Tt][Pp][Ss]?://"
36
+ },
37
+ "country_code": {
38
+ "title": "Country code",
39
+ "description": "ISO 3166-1 alpha-2 code in upper case.",
40
+ "type": "string",
41
+ "pattern": "^[A-Z]{2}$"
42
+ },
43
+ "currency": {
44
+ "title": "Currency",
45
+ "description": "ISO 4217 currency code.",
46
+ "type": "string",
47
+ "pattern": "^[A-Z]{3}$"
48
+ },
49
+ "address": {
50
+ "title": "Postal address",
51
+ "type": "object",
52
+ "required": [
53
+ "country_code"
54
+ ],
55
+ "additionalProperties": false,
56
+ "properties": {
57
+ "street_address": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "description": "Street and house number."
61
+ },
62
+ "postal_code": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "description": "Postal code as used locally, for example 80331."
66
+ },
67
+ "locality": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "description": "City or town."
71
+ },
72
+ "region": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "description": "State or region."
76
+ },
77
+ "country_code": {
78
+ "$ref": "#/$defs/country_code"
79
+ }
80
+ }
81
+ },
82
+ "location": {
83
+ "title": "Coordinates",
84
+ "description": "WGS 84 coordinates of the entrance or building.",
85
+ "type": "object",
86
+ "required": [
87
+ "lat",
88
+ "lon"
89
+ ],
90
+ "additionalProperties": false,
91
+ "properties": {
92
+ "lat": {
93
+ "type": "number",
94
+ "minimum": -90,
95
+ "maximum": 90,
96
+ "description": "Latitude in decimal degrees (WGS 84); positive is north of the equator, for example 48.1371."
97
+ },
98
+ "lon": {
99
+ "type": "number",
100
+ "minimum": -180,
101
+ "maximum": 180,
102
+ "description": "Longitude in decimal degrees (WGS 84); positive is east of Greenwich, for example 11.5754."
103
+ }
104
+ }
105
+ },
106
+ "image": {
107
+ "title": "Image",
108
+ "description": "An openly licensed image. Each image carries its own licence, author and source.",
109
+ "type": "object",
110
+ "required": [
111
+ "url",
112
+ "licence",
113
+ "author",
114
+ "source_url"
115
+ ],
116
+ "additionalProperties": false,
117
+ "properties": {
118
+ "url": {
119
+ "$ref": "#/$defs/url",
120
+ "description": "Where the file is served from (our assets folder or the original host)."
121
+ },
122
+ "licence": {
123
+ "type": "string",
124
+ "minLength": 2,
125
+ "description": "SPDX identifier, for example CC-BY-4.0, CC-BY-SA-4.0 or CC0-1.0."
126
+ },
127
+ "author": {
128
+ "type": "string",
129
+ "minLength": 1,
130
+ "description": "Name of the photographer or creator, as the licence requires it to be credited."
131
+ },
132
+ "source_url": {
133
+ "$ref": "#/$defs/url",
134
+ "description": "Page describing the original file and its licence."
135
+ },
136
+ "title": {
137
+ "type": "string",
138
+ "description": "Short caption describing what the image shows."
139
+ },
140
+ "width": {
141
+ "type": "integer",
142
+ "minimum": 1,
143
+ "description": "Width of the image file in pixels."
144
+ },
145
+ "height": {
146
+ "type": "integer",
147
+ "minimum": 1,
148
+ "description": "Height of the image file in pixels."
149
+ }
150
+ }
151
+ },
152
+ "external_ref": {
153
+ "title": "External reference",
154
+ "description": "A pointer to a record in another service. Never stores the other service's values.",
155
+ "type": "object",
156
+ "required": [
157
+ "source",
158
+ "id"
159
+ ],
160
+ "additionalProperties": false,
161
+ "properties": {
162
+ "source": {
163
+ "type": "string",
164
+ "pattern": "^[a-z0-9_.-]+$",
165
+ "description": "Short name of the other service, for example tripadvisor or untappd. Lowercase letters, digits, dots, dashes and underscores."
166
+ },
167
+ "id": {
168
+ "type": "string",
169
+ "minLength": 1,
170
+ "description": "The record's identifier in the other service."
171
+ },
172
+ "url": {
173
+ "$ref": "#/$defs/url"
174
+ }
175
+ }
176
+ },
177
+ "dataset_meta": {
178
+ "title": "Dataset metadata",
179
+ "type": "object",
180
+ "required": [
181
+ "licence"
182
+ ],
183
+ "properties": {
184
+ "licence": {
185
+ "type": "string",
186
+ "pattern": "^\\(*[A-Za-z0-9][A-Za-z0-9.-]*\\+?(?: WITH [A-Za-z0-9][A-Za-z0-9.-]*\\+?)?\\)*(?: (?:AND|OR) \\(*[A-Za-z0-9][A-Za-z0-9.-]*\\+?(?: WITH [A-Za-z0-9][A-Za-z0-9.-]*\\+?)?\\)*)*$",
187
+ "description": "Licence of the file as an SPDX licence expression, for example MIT, CC0-1.0, CC-BY-4.0, ODbL-1.0 or \"MIT OR Apache-2.0\". Use identifiers from the SPDX licence list (https://spdx.org/licenses/) or LicenseRef-<name> for others.",
188
+ "examples": [
189
+ "MIT",
190
+ "CC-BY-4.0"
191
+ ]
192
+ }
193
+ },
194
+ "description": "File-level facts that are not records. The schema version is the $schema URL; the data version is the release tag."
195
+ }
196
+ }
197
+ }
@@ -0,0 +1,197 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.roastbook.coffee/common/common.schema.v0.4.0.json",
4
+ "title": "Open Coffee common definitions",
5
+ "description": "Building blocks shared by every Open Coffee dataset (coffee places, brew methods and equipment; roasters and beans later). Reference them by absolute $id plus a JSON pointer.",
6
+ "$defs": {
7
+ "id": {
8
+ "title": "Identifier",
9
+ "description": "Permanent, opaque identifier. Never reused, never derived from a name, never deleted. Lowercase letters, digits, dots, dashes and underscores; starts and ends with a letter or digit.",
10
+ "type": "string",
11
+ "pattern": "^[a-z0-9][a-z0-9_.-]*[a-z0-9]$",
12
+ "minLength": 3,
13
+ "maxLength": 64,
14
+ "examples": [
15
+ "cp-7k2m9x4qvd"
16
+ ]
17
+ },
18
+ "date": {
19
+ "title": "Date",
20
+ "description": "Calendar date, YYYY-MM-DD.",
21
+ "type": "string",
22
+ "format": "date"
23
+ },
24
+ "datetime": {
25
+ "title": "Timestamp",
26
+ "description": "RFC 3339 timestamp with time zone, for example 2026-11-05T14:00:00Z.",
27
+ "type": "string",
28
+ "format": "date-time"
29
+ },
30
+ "url": {
31
+ "title": "URL",
32
+ "description": "Absolute http or https address. Letters outside ASCII, such as umlauts in the host or path, may be written as they are (an IRI, for example https://kaffee-münchen.de/über-uns). The scheme is not case-sensitive.",
33
+ "type": "string",
34
+ "format": "iri",
35
+ "pattern": "^[Hh][Tt][Tt][Pp][Ss]?://"
36
+ },
37
+ "country_code": {
38
+ "title": "Country code",
39
+ "description": "ISO 3166-1 alpha-2 code in upper case.",
40
+ "type": "string",
41
+ "pattern": "^[A-Z]{2}$"
42
+ },
43
+ "currency": {
44
+ "title": "Currency",
45
+ "description": "ISO 4217 currency code.",
46
+ "type": "string",
47
+ "pattern": "^[A-Z]{3}$"
48
+ },
49
+ "address": {
50
+ "title": "Postal address",
51
+ "type": "object",
52
+ "required": [
53
+ "country_code"
54
+ ],
55
+ "additionalProperties": false,
56
+ "properties": {
57
+ "street_address": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "description": "Street and house number."
61
+ },
62
+ "postal_code": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "description": "Postal code as used locally, for example 80331."
66
+ },
67
+ "locality": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "description": "City or town."
71
+ },
72
+ "region": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "description": "State or region."
76
+ },
77
+ "country_code": {
78
+ "$ref": "#/$defs/country_code"
79
+ }
80
+ }
81
+ },
82
+ "location": {
83
+ "title": "Coordinates",
84
+ "description": "WGS 84 coordinates of the entrance or building.",
85
+ "type": "object",
86
+ "required": [
87
+ "lat",
88
+ "lon"
89
+ ],
90
+ "additionalProperties": false,
91
+ "properties": {
92
+ "lat": {
93
+ "type": "number",
94
+ "minimum": -90,
95
+ "maximum": 90,
96
+ "description": "Latitude in decimal degrees (WGS 84); positive is north of the equator, for example 48.1371."
97
+ },
98
+ "lon": {
99
+ "type": "number",
100
+ "minimum": -180,
101
+ "maximum": 180,
102
+ "description": "Longitude in decimal degrees (WGS 84); positive is east of Greenwich, for example 11.5754."
103
+ }
104
+ }
105
+ },
106
+ "image": {
107
+ "title": "Image",
108
+ "description": "An openly licensed image. Each image carries its own licence, author and source.",
109
+ "type": "object",
110
+ "required": [
111
+ "url",
112
+ "licence",
113
+ "author",
114
+ "source_url"
115
+ ],
116
+ "additionalProperties": false,
117
+ "properties": {
118
+ "url": {
119
+ "$ref": "#/$defs/url",
120
+ "description": "Where the file is served from (our assets folder or the original host)."
121
+ },
122
+ "licence": {
123
+ "type": "string",
124
+ "minLength": 2,
125
+ "description": "SPDX identifier, for example CC-BY-4.0, CC-BY-SA-4.0 or CC0-1.0."
126
+ },
127
+ "author": {
128
+ "type": "string",
129
+ "minLength": 1,
130
+ "description": "Name of the photographer or creator, as the licence requires it to be credited."
131
+ },
132
+ "source_url": {
133
+ "$ref": "#/$defs/url",
134
+ "description": "Page describing the original file and its licence."
135
+ },
136
+ "title": {
137
+ "type": "string",
138
+ "description": "Short caption describing what the image shows."
139
+ },
140
+ "width": {
141
+ "type": "integer",
142
+ "minimum": 1,
143
+ "description": "Width of the image file in pixels."
144
+ },
145
+ "height": {
146
+ "type": "integer",
147
+ "minimum": 1,
148
+ "description": "Height of the image file in pixels."
149
+ }
150
+ }
151
+ },
152
+ "external_ref": {
153
+ "title": "External reference",
154
+ "description": "A pointer to a record in another service. Never stores the other service's values.",
155
+ "type": "object",
156
+ "required": [
157
+ "source",
158
+ "id"
159
+ ],
160
+ "additionalProperties": false,
161
+ "properties": {
162
+ "source": {
163
+ "type": "string",
164
+ "pattern": "^[a-z0-9_.-]+$",
165
+ "description": "Short name of the other service, for example tripadvisor or untappd. Lowercase letters, digits, dots, dashes and underscores."
166
+ },
167
+ "id": {
168
+ "type": "string",
169
+ "minLength": 1,
170
+ "description": "The record's identifier in the other service."
171
+ },
172
+ "url": {
173
+ "$ref": "#/$defs/url"
174
+ }
175
+ }
176
+ },
177
+ "dataset_meta": {
178
+ "title": "Dataset metadata",
179
+ "type": "object",
180
+ "required": [
181
+ "licence"
182
+ ],
183
+ "properties": {
184
+ "licence": {
185
+ "type": "string",
186
+ "pattern": "^\\(*[A-Za-z0-9][A-Za-z0-9.-]*\\+?(?: WITH [A-Za-z0-9][A-Za-z0-9.-]*\\+?)?\\)*(?: (?:AND|OR) \\(*[A-Za-z0-9][A-Za-z0-9.-]*\\+?(?: WITH [A-Za-z0-9][A-Za-z0-9.-]*\\+?)?\\)*)*$",
187
+ "description": "Licence of the file as an SPDX licence expression, for example MIT, CC0-1.0, CC-BY-4.0, ODbL-1.0 or \"MIT OR Apache-2.0\". Use identifiers from the SPDX licence list (https://spdx.org/licenses/) or LicenseRef-<name> for others.",
188
+ "examples": [
189
+ "MIT",
190
+ "CC-BY-4.0"
191
+ ]
192
+ }
193
+ },
194
+ "description": "File-level facts that are not records. The schema version is the $schema URL; the data version is the release tag."
195
+ }
196
+ }
197
+ }