Skip to main content

Editor integration

JSON Schemas (draft 2020-12) live under schemas/, one per kind. Any editor with yaml-language-server can validate against them.

Validate YAML in your editor​

  1. Add the modeline as the first line of each YAML file:

    # yaml-language-server: $schema=https://raw.githubusercontent.com/no42-org/onmsctl/main/schemas/event-source.schema.json
  2. Swap the filename for the document's kind. Pick it from the schema files table.

  3. Optional: pin a release tag instead of main for stability.

    https://raw.githubusercontent.com/no42-org/onmsctl/<tag>/schemas/<file>

    The tag must contain the schema. Kinds added after that release have no schema file at that tag. To validate against a local clone instead, point the modeline at the file on disk:

    # yaml-language-server: $schema=<path-to-clone>/schemas/<file>

requisition export writes this modeline into its YAML output for you.

Schema files​

kindSchema file
EventSourceevent-source.schema.json
EventSourceOrderevent-source-order.schema.json
ThresholdGroupthreshold-group.schema.json
ThreshdPackagethreshd-package.schema.json
Requisitionrequisition.schema.json
Useriam-user.schema.json
SnmpConfigsnmp-config.schema.json
Maintenancemaintenance.schema.json
DataCollectionSourcedatacollection.schema.json
BusinessServicebusiness-service.schema.json
Graphgraph.schema.json

Regenerate the schemas with make schema. CI fails if a committed schema lags its Rust types.

Tell ordered lists from sets​

The requisition schema annotates list fields with x-onmsctl-list-kind: ordered|set. Diff tooling uses it to tell ordered sequences (detectors, policies) from sets (categories, services).