{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://www.schemastore.org/jsontron-0.1.json", "title": "Jsontron 0.1", "description": "Jsontron vocabulary: Schematron-like rules and assert keywords over JSON Schema, using jq expressions.", "properties": { "rules": { "type": "array", "minItems": 1, "description": "Array of rules. Each rule selects context nodes with a jq expression and runs asserts.", "items": { "type": "object", "required": ["context", "asserts"], "additionalProperties": false, "properties": { "context": { "type": "string", "minLength": 1, "description": "jq expression evaluated against the current instance; each result is a context node." }, "asserts": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["test"], "additionalProperties": false, "properties": { "test": { "type": "string", "minLength": 1, "description": "jq expression evaluated with . set to the context node. Fails when not jq-truthy." }, "message": { "type": "string", "description": "jq expression evaluating to a string (interpolation supported). If the value does not start with a double quote, quotes are added implicitly for parsing." } } } } } } }, "assert": { "description": "Sugar for a rule with context \".\". String, object, or array of those; all append to one context=\".\" rule.", "oneOf": [ { "type": "string", "minLength": 1, "description": "Shorthand: test and message source are this jq expression." }, { "type": "object", "required": ["test"], "additionalProperties": false, "properties": { "test": { "type": "string", "minLength": 1 }, "message": { "type": "string" } } }, { "type": "array", "minItems": 1, "items": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "object", "required": ["test"], "additionalProperties": false, "properties": { "test": { "type": "string", "minLength": 1 }, "message": { "type": "string" } } } ] } } ] } } }