Schema module

Helper module to work with raw JSON Schema

class json_schema_validator.schema.Schema(json_obj)

JSON schema object

enum

Enumeration of possible correct values.

Must be either None or a non-empty list of valid objects. The list must not contain duplicate elements.

pattern

Note

JSON schema specifications says that this value SHOULD follow the EMCA 262/Perl 5 format. We cannot support this so we support python regular expressions instead. This is still valid but should be noted for clarity.

:returns None or compiled regular expression

properties

The properties property contains schema for each property in a dictionary.

The dictionary name is the property name. The dictionary value is the schema object itself.

type

Return the ‘type’ property of this schema.

The return value is always a list of correct JSON types. Correct JSON types are one of the pre-defined simple types or another schema object.

List of built-in simple types: * ‘string’ * ‘number’ * ‘integer’ * ‘boolean’ * ‘object’ * ‘array’ * ‘any’ (default)