module

Krikri::Lint::JsonSchema

Minimal JSON Schema (Draft-07-style) validator covering the keyword subset ansible-lint's vendored schemas use, with jsonschema-style best-match error selection (deepest instance path wins).

Instance data is JSON::Any; schema is JSON::Any.

Constants

SCHEMA_KEYWORDS = ["$defs", "$ref", "type", "enum", "const", "pattern", "minLength", "properties", "required", "additionalProperties", "items", "allOf", "anyOf", "oneOf", "not", "if", "then", "else"] of ::String

Class methods

validate(instance : JSON::Any, schema : JSON::Any) : ValidationResult
Source

Nested types