connexion.json_schema

Module containing all code related to json schema validation.

Module Contents

Functions

resolve_refs(spec, store=None, handlers=None)

Resolve JSON references like {"$ref": <some URI>} in a spec.

allow_nullable(validation_fn: Callable) → Callable

Extend an existing validation function, so it allows nullable values to be null.

validate_required(validator, required, instance, schema)

validate_readOnly(validator, ro, instance, schema)

validate_writeOnly(validator, wo, instance, schema)

Attributes

default_handlers

Draft4RequestValidator

Draft4ResponseValidator

connexion.json_schema.default_handlers
connexion.json_schema.resolve_refs(spec, store=None, handlers=None)

Resolve JSON references like {“$ref”: <some URI>} in a spec. Optionally takes a store, which is a mapping from reference URLs to a dereferenced objects. Prepopulating the store can avoid network calls.

connexion.json_schema.allow_nullable(validation_fn: Callable) Callable

Extend an existing validation function, so it allows nullable values to be null.

connexion.json_schema.validate_required(validator, required, instance, schema)
connexion.json_schema.validate_readOnly(validator, ro, instance, schema)
connexion.json_schema.validate_writeOnly(validator, wo, instance, schema)
connexion.json_schema.Draft4RequestValidator
connexion.json_schema.Draft4ResponseValidator