Skip to content

JSON Schema

The Sightmap v1 JSON Schema is the machine-readable contract for .sightmap/*.yaml files. It is published in the spec repo and addressable by a stable $id URL.

Spec stream1
DraftJSON Schema 2020-12
$idhttps://raw.githubusercontent.com/sightmap/spec/main/spec/v1/sightmap.schema.json
Sourcespec/v1/sightmap.schema.json

For a human-readable walk-through of the same fields, see YAML schema (full).

Paste this comment as the first line of any .sightmap/*.yaml file to opt into editor validation, autocomplete, and hover docs:

# yaml-language-server: $schema=https://raw.githubusercontent.com/sightmap/spec/main/spec/v1/sightmap.schema.json
version: 1
views:
- name: Home
route: /

The directive is recognized by the Red Hat YAML language server, which most editor integrations use under the hood.

  1. Install the YAML extension by Red Hat.
  2. Either add the # yaml-language-server: $schema=… directive at the top of each file, or wire the schema globally in your workspace settings:
{
"yaml.schemas": {
"https://raw.githubusercontent.com/sightmap/spec/main/spec/v1/sightmap.schema.json": [
".sightmap/**/*.yaml",
".sightmap/**/*.yml"
]
}
}

JetBrains IDEs ship with a JSON Schema mappings UI:

  1. Settings → Languages & Frameworks → Schemas and DTDs → JSON Schema Mappings
  2. Add a mapping with the $id URL above as the schema URL and .sightmap/*.yaml as the file pattern.

The inline # yaml-language-server: $schema=… directive is also honored.

Most LSP setups for Neovim wrap the same Red Hat language server. Configure yamlls with the schema mapping, or rely on the inline directive.

To validate .sightmap/*.yaml against the schema in CI, use the official CLI:

Terminal window
pnpx @sightmap/sightmap validate

See @sightmap/sightmap on npm.