Skip to content

JSON Schemas

ortfo/db exports JSON Schemas for the different data files it uses.

These schemas serve as both validation when running the program, and as a way to provide a nice auto-complete experience in your editor, provided that it supports JSON schemas.

Client libraries

Want type definitions in your code? Check out the client libraries beta for your language.

Getting the schemas


See ortfodb schemas

Over the network

The schemas are all available on ortfo/db's repository in the schemas/ directory, and are re-exported to the domain for easier access.
The schema for the ortfodb.yaml configuration file
The schema for the database.json file (see Database format)
The schema for the tags repository
The schema for the technologies repository

Version pining

Instead of getting the latest version, you can get a specific version by specifying it in the URL before the file name:

Using it in your editor

A motivating example, for the tags repository file:

# yaml-language-server: $schema=

- singular: website
  plural: websites
  aliases: site # expected array of strings, got string

RedHat develops a Language Server Protocol for YAML that includes JSON Schema support, so most IDEs that support LSPs should be able to support this feature.

On files directly

You can add a magic comment at the top of your file to associate it with a JSON schema [docs]:

# yaml-language-server: $schema=

make thumbnails:
  enabled: true

Associating by filename

You can associate glob patterns of YAML filenames with JSON schemas in your editor settings, see the documentation

IDE support

RedHat YAML Extension
coc-yaml, a CoC plugin
Any LSP client plugin, such as nvim-lspconfig should also do the trick
Other editors
Please contribute to the docs (see "Edit this page" just below)