jsonSchemaSanity
jsonSchemaSanity runs lightweight JSON Schema checks over the schema model.
The function is shared by several JSON Schema rules. Each rule selects a check using functionOptions.check.
| Name | Type | Required? | Description |
|---|---|---|---|
| check | string |
yes | The sanity check to run: type, enumConst, required, dependent, patterns, composition, quality or examples |
Example ruleset configuration
json-schema-type-constraint-compatible:
description: JSON Schema type-specific constraints must match the declared type.
type: validation
severity: error
given: $
then:
function: jsonSchemaSanity
functionOptions:
check: type
The function is used by the JSON Schema recommended ruleset for type, enum, required, dependent, pattern, composition, quality and example checks.
