Skip to content
RoastbookOpen Coffee Schema

JSON Schema Open standard · v0.5.0

Open Coffee Schema

Coffee places, brewing methods and equipment, described in a format everyone can use.

Explore the fields, compare versions or check your own data. Published versions have permanent addresses and never change.

Inside a coffee placeJSON
{
  "name": "Corner Café",
  "serving": {
    "espresso": true,
    "filter": true
  },
  "amenities": {
    "wifi": true
  }
}

An excerpt. Every field has a definition.

Explore the schemas

Versioned definitions. Ready for your app.

One format, wherever your data goes

A data file names its exact version in $schema, so any JSON Schema validator can check it. Coffee places also have a JSON-LD context for schema.org. See the standard in use in the Open Coffee dataset.

Quick start

Each schema is served at its $id. Download the schema and the shared definitions it references, then validate a data file:

curl -sSO https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.5.0.json
curl -sSO https://schema.roastbook.coffee/common/common.schema.v0.4.0.json
curl -sSO https://data.roastbook.coffee/datasets/coffee-places/de/munich.json

bunx -p ajv-cli@5 -p ajv-formats@3 ajv validate --spec=draft2020 --strict=true -c ajv-formats \
  -s coffee-places.schema.v0.5.0.json -r common.schema.v0.4.0.json -d munich.json

In JavaScript, @roastbook/open-coffee-schema (on npm: bun add @roastbook/open-coffee-schema, install guide) gives you TypeScript types, the schema files for Ajv and the allowed values of every list. To link to a field, use https://schema.roastbook.coffee/coffee-places/latest/#field-serving.filter; the path after field- is relative to one record.