JSON Schema Validation of Commands
Each command type is described by a published JSON Schema, and every command is validated before execution. Invalid commands are rejected with precise, path-based errors. This prevents malformed or hallucinated AI output from reaching grid state.
Planned. This page shows the specification from issue #207. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
Split view: command editor on the left, live validation panel on the right showing 'valid'.
Expected behavior
Typing updates the validation panel live with JSON-pointer paths and messages. Execute is disabled while the command is invalid. In strictMode, unknown properties are errors; with strictMode off, they are warnings and are stripped.
Planned API surface
grid.commands.validate(command)ValidationErroronCommandRejectedcommands.strictModecommands.allowAdditionalPropertiesAcceptance criteria
- Every op has a schema (pending)
- validate() returns all errors, not only the first (pending)
- Errors include a JSON pointer, keyword and human-readable message (pending)
- Rejected commands never mutate state and fire onCommandRejected (pending)
- Column names are validated against the current column set (pending)