Skip to main content

system_json_schema

Function system_json_schema 

Source
pub fn system_json_schema(kind: SystemKind) -> String
Expand description

The JSON Schema for a preset driving kind, self-contained, as committed under presets/schema/.

No if/then on the path from the root to a parameter. Taplo validates through a conditional but reads neither hover text nor completions through one, so json_schema’s per-system cases complete nothing. Here system is a const and params is this system’s property set, unconditionally — the set params_of gives the generic file’s matching case, $refing the same definition keys.

[layer] is not narrowed. A layer names its own system, and narrowing it here would take one conditional per system and every system’s parameter definitions in every file. Its params stays what the table declares: any name, bound to a string. The generic file still validates a layer’s names.

definitions is pruned to what this file references — the structural tables reachable from the root, and this system’s parameter declarations. A $ref into another file is not something Taplo resolves, so nothing is shared.