@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,265 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.2.0.json",
4
+ "title": "Open Coffee brew methods",
5
+ "description": "Ways of brewing coffee (espresso, pour-over, V60, AeroPress, cold brew…), their typical parameters and what a coffee journal should record for each. Methods form a tree: a device-specific method such as v60 has the general method pour-over as parent. Part of Roastbook Open Coffee.",
6
+ "type": "object",
7
+ "required": [
8
+ "$schema",
9
+ "meta",
10
+ "brew_methods"
11
+ ],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "$schema": {
15
+ "type": "string",
16
+ "pattern": "^https://schema\\.roastbook\\.coffee/brew-methods/brew-methods\\.schema\\.v[0-9]+\\.[0-9]+\\.[0-9]+\\.json$",
17
+ "description": "Canonical URL of the schema version this file follows."
18
+ },
19
+ "meta": {
20
+ "type": "object",
21
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.2.0.json#/$defs/dataset_meta",
22
+ "unevaluatedProperties": false
23
+ },
24
+ "brew_methods": {
25
+ "type": "array",
26
+ "items": {
27
+ "$ref": "#/$defs/brew_method"
28
+ }
29
+ }
30
+ },
31
+ "$defs": {
32
+ "range": {
33
+ "title": "Range",
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "minProperties": 1,
37
+ "properties": {
38
+ "min": {
39
+ "type": "number",
40
+ "minimum": 0,
41
+ "description": "Lowest common value, in the unit named by the parameter (for example grams for dose_g, degrees Celsius for water_temperature_celsius)."
42
+ },
43
+ "max": {
44
+ "type": "number",
45
+ "minimum": 0,
46
+ "description": "Highest common value, in the unit named by the parameter."
47
+ },
48
+ "typical": {
49
+ "type": "number",
50
+ "minimum": 0,
51
+ "description": "A good starting value, in the unit named by the parameter."
52
+ }
53
+ }
54
+ },
55
+ "parameter": {
56
+ "title": "Brew parameter",
57
+ "enum": [
58
+ "dose_g",
59
+ "brew_water_g",
60
+ "yield_g",
61
+ "ratio",
62
+ "grind_setting",
63
+ "brew_time_seconds",
64
+ "target_time_seconds",
65
+ "water_temperature_celsius",
66
+ "bloom_time_seconds",
67
+ "bloom_water_g",
68
+ "preinfusion_time_seconds",
69
+ "preinfusion_pressure_bar",
70
+ "brew_pressure_bar",
71
+ "flow_rate_ml_per_second",
72
+ "tamp_force_kg",
73
+ "paper_filter_position",
74
+ "distribution_method",
75
+ "pour_count",
76
+ "steep_time_seconds"
77
+ ],
78
+ "description": "Parameter keys shared with coffee journals such as Roastbook. ratio is brew water to coffee (16 means 1:16); for espresso it is yield to dose (2 means 1:2)."
79
+ },
80
+ "grind_size": {
81
+ "title": "Grind size",
82
+ "enum": [
83
+ "extra_fine",
84
+ "fine",
85
+ "medium_fine",
86
+ "medium",
87
+ "medium_coarse",
88
+ "coarse",
89
+ "extra_coarse"
90
+ ],
91
+ "description": "Descriptive grind size; extra_fine is Turkish, fine espresso, medium filter, coarse French press and cold brew."
92
+ },
93
+ "brew_method": {
94
+ "title": "Brew method",
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": [
98
+ "id",
99
+ "name",
100
+ "category",
101
+ "extraction",
102
+ "description",
103
+ "checked_at"
104
+ ],
105
+ "properties": {
106
+ "id": {
107
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.2.0.json#/$defs/id",
108
+ "description": "Stable readable slug, e.g. v60, french-press. Never reused.",
109
+ "examples": [
110
+ "v60"
111
+ ]
112
+ },
113
+ "name": {
114
+ "type": "string",
115
+ "minLength": 1,
116
+ "description": "Common English name of the method, for example Pour-over or French press."
117
+ },
118
+ "aliases": {
119
+ "type": "array",
120
+ "uniqueItems": true,
121
+ "items": {
122
+ "type": "string",
123
+ "minLength": 1
124
+ },
125
+ "description": "Other names in any language, e.g. Filterkaffee, drip."
126
+ },
127
+ "parent": {
128
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.2.0.json#/$defs/id",
129
+ "description": "The more general method, e.g. pour-over for v60."
130
+ },
131
+ "category": {
132
+ "enum": [
133
+ "espresso",
134
+ "filter",
135
+ "immersion",
136
+ "pressure",
137
+ "vacuum",
138
+ "boiling",
139
+ "cold"
140
+ ],
141
+ "description": "Family used for grouping: espresso (9-bar style pressure), filter (percolation through a filter), immersion (steep, then separate), pressure (non-espresso pressure such as AeroPress or moka pot), vacuum (siphon), boiling (cezve/ibrik), cold (cold water over hours)."
142
+ },
143
+ "extraction": {
144
+ "enum": [
145
+ "percolation",
146
+ "immersion",
147
+ "hybrid"
148
+ ],
149
+ "description": "Physical principle; matches equipment brewer.mechanism."
150
+ },
151
+ "description": {
152
+ "type": "string",
153
+ "minLength": 20,
154
+ "maxLength": 600,
155
+ "description": "Short neutral explanation in our own words."
156
+ },
157
+ "introduced_year": {
158
+ "type": "integer",
159
+ "minimum": 1000,
160
+ "maximum": 2100,
161
+ "description": "Year the method or device was invented or first sold."
162
+ },
163
+ "origin_country_code": {
164
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.2.0.json#/$defs/country_code"
165
+ },
166
+ "equipment_types": {
167
+ "type": "array",
168
+ "uniqueItems": true,
169
+ "description": "Equipment types needed, from the equipment schema's type list.",
170
+ "items": {
171
+ "$ref": "https://schema.roastbook.coffee/equipment/equipment.schema.v0.2.0.json#/$defs/type"
172
+ }
173
+ },
174
+ "typical_parameters": {
175
+ "title": "Typical parameters",
176
+ "type": "object",
177
+ "additionalProperties": false,
178
+ "description": "Common starting ranges, not rules.",
179
+ "properties": {
180
+ "dose_g": {
181
+ "$ref": "#/$defs/range"
182
+ },
183
+ "ratio": {
184
+ "$ref": "#/$defs/range"
185
+ },
186
+ "water_temperature_celsius": {
187
+ "$ref": "#/$defs/range"
188
+ },
189
+ "brew_time_seconds": {
190
+ "$ref": "#/$defs/range"
191
+ },
192
+ "brew_pressure_bar": {
193
+ "$ref": "#/$defs/range"
194
+ },
195
+ "grind_size": {
196
+ "type": "array",
197
+ "uniqueItems": true,
198
+ "minItems": 1,
199
+ "items": {
200
+ "$ref": "#/$defs/grind_size"
201
+ }
202
+ },
203
+ "grind_d50_microns": {
204
+ "$ref": "#/$defs/range",
205
+ "description": "Median particle size in micrometres, comparable across grinders."
206
+ }
207
+ }
208
+ },
209
+ "recorded_parameters": {
210
+ "type": "array",
211
+ "uniqueItems": true,
212
+ "items": {
213
+ "$ref": "#/$defs/parameter"
214
+ },
215
+ "description": "Parameters a coffee journal should offer when logging a brew with this method."
216
+ },
217
+ "typical_drinks": {
218
+ "type": "array",
219
+ "uniqueItems": true,
220
+ "items": {
221
+ "type": "string",
222
+ "minLength": 1
223
+ },
224
+ "description": "Drinks usually made with this method, in plain lowercase English, for example espresso, cappuccino or flat white."
225
+ },
226
+ "xref": {
227
+ "type": "object",
228
+ "additionalProperties": false,
229
+ "properties": {
230
+ "wikidata": {
231
+ "type": "string",
232
+ "pattern": "^Q[1-9][0-9]*$",
233
+ "description": "Wikidata item id of the method, for example Q180289 for espresso."
234
+ },
235
+ "beanconqueror": {
236
+ "type": "string",
237
+ "pattern": "^[A-Z0-9_]+$",
238
+ "description": "Beanconqueror PREPARATION_TYPES key, for app imports."
239
+ }
240
+ },
241
+ "description": "Identifiers of the method in other datasets and apps."
242
+ },
243
+ "image": {
244
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.2.0.json#/$defs/image"
245
+ },
246
+ "checked_at": {
247
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.2.0.json#/$defs/datetime"
248
+ },
249
+ "filter_types": {
250
+ "type": "array",
251
+ "uniqueItems": true,
252
+ "items": {
253
+ "enum": [
254
+ "paper",
255
+ "metal",
256
+ "cloth",
257
+ "none"
258
+ ]
259
+ },
260
+ "description": "Filters the method can use. paper: paper filters; metal: metal mesh or perforated metal; cloth: cloth filters; none: no filter (for example cezve or cold brew in a jar)."
261
+ }
262
+ }
263
+ }
264
+ }
265
+ }
@@ -0,0 +1,272 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.3.0.json",
4
+ "title": "Open Coffee brew methods",
5
+ "description": "Ways of brewing coffee (espresso, pour-over, V60, AeroPress, cold brew…), their typical parameters and what a coffee journal should record for each. Methods form a tree: a device-specific method such as v60 has the general method pour-over as parent. Part of Roastbook Open Coffee.",
6
+ "type": "object",
7
+ "required": [
8
+ "$schema",
9
+ "meta",
10
+ "brew_methods"
11
+ ],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "$schema": {
15
+ "type": "string",
16
+ "pattern": "^https://schema\\.roastbook\\.coffee/brew-methods/brew-methods\\.schema\\.v[0-9]+\\.[0-9]+\\.[0-9]+\\.json$",
17
+ "description": "Canonical URL of the schema version this file follows."
18
+ },
19
+ "meta": {
20
+ "type": "object",
21
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.3.0.json#/$defs/dataset_meta",
22
+ "unevaluatedProperties": false
23
+ },
24
+ "brew_methods": {
25
+ "type": "array",
26
+ "items": {
27
+ "$ref": "#/$defs/brew_method"
28
+ }
29
+ }
30
+ },
31
+ "$defs": {
32
+ "range": {
33
+ "title": "Range",
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "minProperties": 1,
37
+ "properties": {
38
+ "min": {
39
+ "type": "number",
40
+ "minimum": 0,
41
+ "description": "Lowest common value, in the unit named by the parameter (for example grams for dose_g, degrees Celsius for water_temperature_celsius)."
42
+ },
43
+ "max": {
44
+ "type": "number",
45
+ "minimum": 0,
46
+ "description": "Highest common value, in the unit named by the parameter."
47
+ },
48
+ "typical": {
49
+ "type": "number",
50
+ "minimum": 0,
51
+ "description": "A good starting value, in the unit named by the parameter."
52
+ }
53
+ },
54
+ "description": "A starting range. When several values are given they must be ordered: min ≤ typical ≤ max. JSON Schema cannot compare two values, so this repository checks it in its examples and data repositories check it in their data."
55
+ },
56
+ "parameter": {
57
+ "title": "Brew parameter",
58
+ "enum": [
59
+ "dose_g",
60
+ "brew_water_g",
61
+ "yield_g",
62
+ "brew_ratio",
63
+ "yield_ratio",
64
+ "grind_setting",
65
+ "brew_time_seconds",
66
+ "target_time_seconds",
67
+ "water_temperature_celsius",
68
+ "bloom_time_seconds",
69
+ "bloom_water_g",
70
+ "preinfusion_time_seconds",
71
+ "preinfusion_pressure_bar",
72
+ "brew_pressure_bar",
73
+ "flow_rate_ml_per_second",
74
+ "tamp_force_kg",
75
+ "paper_filter_position",
76
+ "distribution_method",
77
+ "pour_count",
78
+ "steep_time_seconds"
79
+ ],
80
+ "description": "Parameter keys shared with coffee journals such as Roastbook. brew_ratio is grams of brew water per gram of coffee (16 means 1:16); yield_ratio is grams of drink in the cup per gram of coffee (2 means a 1:2 espresso)."
81
+ },
82
+ "grind_size": {
83
+ "title": "Grind size",
84
+ "enum": [
85
+ "extra_fine",
86
+ "fine",
87
+ "medium_fine",
88
+ "medium",
89
+ "medium_coarse",
90
+ "coarse",
91
+ "extra_coarse"
92
+ ],
93
+ "description": "Descriptive grind size; extra_fine is Turkish, fine espresso, medium filter, coarse French press and cold brew."
94
+ },
95
+ "brew_method": {
96
+ "title": "Brew method",
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": [
100
+ "id",
101
+ "name",
102
+ "category",
103
+ "extraction",
104
+ "description",
105
+ "checked_at"
106
+ ],
107
+ "properties": {
108
+ "id": {
109
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.3.0.json#/$defs/id",
110
+ "description": "Stable readable slug, e.g. v60, french-press. Never reused.",
111
+ "examples": [
112
+ "v60"
113
+ ]
114
+ },
115
+ "name": {
116
+ "type": "string",
117
+ "minLength": 1,
118
+ "description": "Common English name of the method, for example Pour-over or French press."
119
+ },
120
+ "aliases": {
121
+ "type": "array",
122
+ "uniqueItems": true,
123
+ "items": {
124
+ "type": "string",
125
+ "minLength": 1
126
+ },
127
+ "description": "Other names in any language, e.g. Filterkaffee, drip."
128
+ },
129
+ "parent": {
130
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.3.0.json#/$defs/id",
131
+ "description": "The more general method, e.g. pour-over for v60."
132
+ },
133
+ "category": {
134
+ "enum": [
135
+ "espresso",
136
+ "filter",
137
+ "immersion",
138
+ "pressure",
139
+ "vacuum",
140
+ "boiling",
141
+ "cold"
142
+ ],
143
+ "description": "Family used for grouping: espresso (9-bar style pressure), filter (percolation through a filter), immersion (steep, then separate), pressure (non-espresso pressure such as AeroPress or moka pot), vacuum (siphon), boiling (cezve/ibrik), cold (cold water over hours)."
144
+ },
145
+ "extraction": {
146
+ "enum": [
147
+ "percolation",
148
+ "immersion",
149
+ "hybrid"
150
+ ],
151
+ "description": "Physical principle; matches equipment brewer.mechanism."
152
+ },
153
+ "description": {
154
+ "type": "string",
155
+ "minLength": 20,
156
+ "maxLength": 600,
157
+ "description": "Short neutral explanation in our own words."
158
+ },
159
+ "introduced_year": {
160
+ "type": "integer",
161
+ "minimum": 1000,
162
+ "maximum": 2100,
163
+ "description": "Year the method or device was invented or first sold."
164
+ },
165
+ "origin_country_code": {
166
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.3.0.json#/$defs/country_code"
167
+ },
168
+ "equipment_types": {
169
+ "type": "array",
170
+ "uniqueItems": true,
171
+ "description": "Equipment types needed, from the equipment schema's type list.",
172
+ "items": {
173
+ "$ref": "https://schema.roastbook.coffee/equipment/equipment.schema.v0.3.0.json#/$defs/type"
174
+ }
175
+ },
176
+ "typical_parameters": {
177
+ "title": "Typical parameters",
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "description": "Common starting ranges, not rules.",
181
+ "properties": {
182
+ "dose_g": {
183
+ "$ref": "#/$defs/range"
184
+ },
185
+ "brew_ratio": {
186
+ "$ref": "#/$defs/range",
187
+ "description": "Grams of brew water per gram of coffee, for example 16 for 1:16. Used for filter, immersion and cold brew."
188
+ },
189
+ "yield_ratio": {
190
+ "$ref": "#/$defs/range",
191
+ "description": "Grams of drink in the cup per gram of coffee, for example 2 for a 1:2 espresso. Used where the drink is weighed, mainly espresso."
192
+ },
193
+ "water_temperature_celsius": {
194
+ "$ref": "#/$defs/range"
195
+ },
196
+ "brew_time_seconds": {
197
+ "$ref": "#/$defs/range"
198
+ },
199
+ "brew_pressure_bar": {
200
+ "$ref": "#/$defs/range"
201
+ },
202
+ "grind_size": {
203
+ "type": "array",
204
+ "uniqueItems": true,
205
+ "minItems": 1,
206
+ "items": {
207
+ "$ref": "#/$defs/grind_size"
208
+ }
209
+ },
210
+ "grind_d50_microns": {
211
+ "$ref": "#/$defs/range",
212
+ "description": "Median particle size in micrometres, comparable across grinders."
213
+ }
214
+ }
215
+ },
216
+ "recorded_parameters": {
217
+ "type": "array",
218
+ "uniqueItems": true,
219
+ "items": {
220
+ "$ref": "#/$defs/parameter"
221
+ },
222
+ "description": "Parameters a coffee journal should offer when logging a brew with this method."
223
+ },
224
+ "typical_drinks": {
225
+ "type": "array",
226
+ "uniqueItems": true,
227
+ "items": {
228
+ "type": "string",
229
+ "minLength": 1
230
+ },
231
+ "description": "Drinks usually made with this method, in plain lowercase English, for example espresso, cappuccino or flat white."
232
+ },
233
+ "xref": {
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "properties": {
237
+ "wikidata": {
238
+ "type": "string",
239
+ "pattern": "^Q[1-9][0-9]*$",
240
+ "description": "Wikidata item id of the method, for example Q180289 for espresso."
241
+ },
242
+ "beanconqueror": {
243
+ "type": "string",
244
+ "pattern": "^[A-Z0-9_]+$",
245
+ "description": "Beanconqueror PREPARATION_TYPES key, for app imports."
246
+ }
247
+ },
248
+ "description": "Identifiers of the method in other datasets and apps."
249
+ },
250
+ "image": {
251
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.3.0.json#/$defs/image"
252
+ },
253
+ "checked_at": {
254
+ "$ref": "https://schema.roastbook.coffee/common/common.schema.v0.3.0.json#/$defs/datetime"
255
+ },
256
+ "filter_types": {
257
+ "type": "array",
258
+ "uniqueItems": true,
259
+ "items": {
260
+ "enum": [
261
+ "paper",
262
+ "metal",
263
+ "cloth",
264
+ "none"
265
+ ]
266
+ },
267
+ "description": "Filters the method can use. paper: paper filters; metal: metal mesh or perforated metal; cloth: cloth filters; none: no filter (for example cezve or cold brew in a jar)."
268
+ }
269
+ }
270
+ }
271
+ }
272
+ }