Package com.babelqueue.schema
Class PayloadValidator
java.lang.Object
com.babelqueue.schema.PayloadValidator
Validates a message's
data block against a per-URN JSON Schema (ADR-0024). A
hand-rolled subset of Draft-07 (zero dependencies, GR-7) whose verdicts match the Go, PHP,
Python and Node validators and babelqueue-registry's compat linter. Supported
keywords: type, required, properties, additionalProperties,
items, enum, const, minLength, minimum; unknown
keywords are ignored. It works on the decoded Map/List/scalar structures
the codec produces (numbers are Long/BigInteger/Double).-
Method Summary
-
Method Details
-
validate
The first violation ofvalueagainstschemaas"<json-pointer>: <reason>", ornullwhen it conforms.- Parameters:
schema- the decoded JSON Schema for the data blockvalue- the decoded value to validate- Returns:
- the first violation, or null when valid
-