Documentation
¶
Overview ¶
Package jsonschema reads the JSON Schemas Flowi keeps from OpenAPI documents (already decoded, references inlined): types, allOf merging, and whether a path of steps exists in a schema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeAllOf ¶
MergeAllOf folds allOf branches into one schema (properties and required combined); other keys of the outer schema win.
Types ¶
type Result ¶
type Result int
Result is what a schema says about a path.
const ( Present Result = iota // the schema has it Absent // the schema rules it out Unknown // the schema allows anything there )
Results.
func Lookup ¶
Lookup says whether the path of steps (object keys, array indexes) exists in schema. A property not listed is Absent even when additionalProperties is not false: the contract is what the schema documents. An untyped {} schema, an object listing no properties, and additionalProperties as a schema or true are Unknown. anyOf/oneOf branches are judged together with the properties beside them.