Backplane. JsonSchema. Compiler. Predicates
(backplane_json_schema v1.10.58)
Copy Markdown
Pure predicates for JSON Schema validation constraints.
Functions return :ok or {:error, context}. Non-applicable data types
pass validation (e.g., pattern checking on non-strings). Regex engine errors
abort validation rather than returning an invertible schema mismatch.
Summary
Functions
Checks const.
Checks enum.
Checks exclusiveMaximum.
Checks exclusiveMinimum.
Checks maxItems.
Checks maxLength, returning an error for malformed UTF-8.
Checks maxProperties.
Checks maximum.
Checks minItems.
Checks minLength, returning an error for malformed UTF-8.
Checks minProperties.
Checks minimum.
Checks multipleOf.
Checks pattern.
Checks if data matches the specified JSON Schema type(s).
Checks uniqueItems. Uses == semantics (1 equals 1.0).
Functions
Checks const.
Checks enum.
Checks exclusiveMaximum.
Checks exclusiveMinimum.
Checks maxItems.
Checks maxLength, returning an error for malformed UTF-8.
Checks maxProperties.
Checks maximum.
Checks minItems.
Checks minLength, returning an error for malformed UTF-8.
Checks minProperties.
Checks minimum.
Checks multipleOf.
Checks pattern.
@spec check_type(term(), String.t() | [String.t()]) :: :ok | {:error, Backplane.JsonSchema.Types.ErrorContext.t()}
Checks if data matches the specified JSON Schema type(s).
Checks uniqueItems. Uses == semantics (1 equals 1.0).