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 stream | 1 |
| Draft | JSON Schema 2020-12 |
$id | https://raw.githubusercontent.com/sightmap/spec/main/spec/v1/sightmap.schema.json |
| Source | spec/v1/sightmap.schema.json |
For a human-readable walk-through of the same fields, see YAML schema (full).
yaml-language-server directive
Section titled “yaml-language-server directive”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.jsonversion: 1views: - name: Home route: /The directive is recognized by the Red Hat YAML language server, which most editor integrations use under the hood.
VS Code
Section titled “VS Code”- Install the YAML extension by Red Hat.
- 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 (IntelliJ, WebStorm, PyCharm)
Section titled “JetBrains (IntelliJ, WebStorm, PyCharm)”JetBrains IDEs ship with a JSON Schema mappings UI:
- Settings → Languages & Frameworks → Schemas and DTDs → JSON Schema Mappings
- Add a mapping with the
$idURL above as the schema URL and.sightmap/*.yamlas the file pattern.
The inline # yaml-language-server: $schema=… directive is also honored.
Neovim
Section titled “Neovim”Most LSP setups for Neovim wrap the same Red Hat language server. Configure yamlls with the schema mapping, or rely on the inline directive.
CI validation
Section titled “CI validation”To validate .sightmap/*.yaml against the schema in CI, use the official CLI:
pnpx @sightmap/sightmap validate