Module Expr Str ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias alias alias alias alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Return Dict Str AttributeLoad NameLoad attr decorator_list decorator_list AttributeLoad NameLoad attr ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Return Dict Str Str AttributeLoad NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list AttributeLoad NameLoad attr ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Return Dict Str Str AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list AttributeLoad NameLoad attr ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Return Dict Str Str Str Str NameLoad Dict Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list AttributeLoad NameLoad attr ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Return Dict Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad decorator_list AttributeLoad NameLoad attr ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad Call NameLoad Assign NameStore Call NameLoad ListLoad TupleLoad Str Str TupleLoad Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Delete SubscriptDel AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad AttributeLoad NameLoad attr decorator_list
N/A N/A 
Extension for generating JSON schema schemas from PySchema classes

JSON schema: http://json-schema.org/

When dumping to JSON schema, all fields in a record are mandatory, although
a list or map can be empty (but must be present). These records are still
dump-able, but they will not validate against the schema.

Usage:

>>> class MyRecord(pyschema.Record):
>>>     foo = Text()
>>>     bar = Integer()
>>>
>>> [pyschema_extensions.jsonschema.]get_root_schema_string(MyRecord)

'{"additionalProperties": false, "required": ["bar", "foo"], "type": "object", "id": "MyRecord", "properties": {"foo": {"t
ype": "string"}, "bar": {"type": "integer"}}}  '
 pyschema core pyschema.types Field Boolean Integer Float pyschema.types Text Enum List Map SubRecord N/A N/A collections OrderedDict N/A N/A N/A ImportError N/A ordereddict OrderedDict N/A N/A N/A simplejson json N/A N/A N/A ImportError N/A N/A json N/A N/A Boolean jsonschema_type_name boolean N/A N/A Integer jsonschema_type_name integer N/A N/A Float jsonschema_type_name number N/A N/A Text jsonschema_type_name string N/A N/A Enum jsonschema_type_name string N/A N/A List jsonschema_type_name array N/A N/A Map avro_type_name object FieldMixin N/A N/A jsonschema_type_schema N/A N/A self state N/A N/A N/A N/A type N/A self jsonschema_type_name N/A N/A N/A Field mixin EnumMixin N/A N/A jsonschema_type_schema N/A N/A self state N/A N/A N/A N/A type enum N/A self jsonschema_type_name N/A sorted N/A list N/A self values N/A N/A N/A Enum mixin ListMixin N/A N/A jsonschema_type_schema N/A N/A self state N/A N/A N/A N/A type items N/A self jsonschema_type_name N/A N/A N/A self field_type jsonschema_type_schema state N/A N/A N/A List mixin MapMixin N/A N/A jsonschema_type_schema N/A N/A self state N/A N/A N/A N/A type additionalProperties patternProperties object True N/A ^.*$ N/A N/A N/A self value_type jsonschema_type_schema state N/A N/A N/A Map mixin SubRecordMixin N/A N/A jsonschema_type_schema N/A N/A self state N/A N/A N/A cls N/A self _schema N/A N/A N/A state record_schemas N/A N/A cls _schema_name N/A get_schema_dict cls state N/A N/A $ref N/A self jsonschema_type_name N/A jsonschema_type_name N/A N/A self N/A N/A N/A N/A N/A #/definitions/{0} format N/A N/A self _schema _schema_name N/A property N/A N/A SubRecord mixin SchemaGeneratorState N/A object N/A __init__ N/A N/A self N/A N/A N/A N/A self record_schemas N/A dict N/A N/A get_schema_dict N/A N/A record state N/A None N/A N/A Return a python dict representing the jsonschema of a record

    Any references to sub-schemas will be URI fragments that won't be
    resolvable without a root schema, available from get_root_schema_dict.
     N/A state N/A state N/A SchemaGeneratorState N/A schema N/A OrderedDict N/A N/A type object N/A id N/A record _schema_name N/A fields N/A dict N/A N/A field_name field_type N/A N/A N/A record _fields iteritems N/A N/A N/A fields N/A field_name N/A N/A field_type jsonschema_type_schema state N/A required N/A set N/A N/A fields keys N/A N/A schema N/A properties fields N/A N/A schema N/A required N/A sorted N/A list required N/A N/A schema N/A additionalProperties False N/A N/A N/A state record_schemas N/A N/A record _schema_name schema N/A schema N/A get_root_schema_dict N/A N/A record N/A N/A N/A Return a root jsonschema for a given record

    A root schema includes the $schema attribute and all sub-record
    schemas and definitions.
     N/A state N/A SchemaGeneratorState N/A schema N/A get_schema_dict record state N/A N/A N/A state record_schemas N/A N/A record _schema_name N/A N/A state record_schemas N/A N/A N/A schema N/A definitions N/A dict N/A N/A name sub_schema N/A N/A N/A state record_schemas iteritems N/A N/A N/A N/A schema N/A definitions N/A name sub_schema N/A schema N/A get_root_schema_string N/A N/A record N/A N/A N/A N/A N/A json dumps N/A get_root_schema_dict record N/A dumps N/A N/A record N/A N/A N/A N/A N/A json dumps N/A N/A core to_json_compatible record N/A loads N/A N/A s record_store schema N/A None None N/A N/A N/A N/A core loads s record_store schema N/A core from_json_compatible N/A