Skip to content

Get Started

This page walks you through the smallest possible OO-LD schema, step by step. If you are not familiar yet with JSON Schema or JSON-LD, you may first want to look at dedicated tutorials like the OSW JSON Schema Tutorial and the OSW JSON-LD Tutorial.

Step 1 - Write a schema that is also a context

The core idea of OO-LD is that a single document is at once a valid JSON Schema and a reference-able JSON-LD remote context. Start from a plain JSON Schema and add an @context:

{
  "$schema": "https://oo-ld.github.io/oold-schema/latest/meta/oold-meta-schema.json",
  "$id": "Minimal.schema.json",
  "@context": {
    "schema": "http://schema.org/",
    "name": "schema:name"
  },
  "title": "Minimal",
  "type": "object",
  "properties": {
    "name": { "type": "string", "description": "Name of the thing" }
  }
}
  • The JSON Schema part (type, properties, …) describes the structure of the object.
  • The @context part maps the name property to the semantic term schema:name, describing its meaning.
  • $id gives the schema a stable identity and $schema declares the OO-LD dialect (the meta-schema).

Step 2 - Try it in the playground

You can explore this exact example - validation, UI generation, and RDF output - in the interactive playground.

Step 3 - Validate schemas in this repository

This repository ships example schemas under examples/ and the OO-LD meta-schema under meta/. To validate them locally:

npm install
npm run validate

Next steps

  • Basic Concepts - how a schema doubles as a context, and how inheritance works.
  • Composition - assemble complex types from reusable building blocks.
  • Schema Instances - how instance documents reference their schema and carry identity and type.