Tags: billy-pilger/GenSON
Tags
* split Schema class into 3 separate classes: 1. SchemaNode to manage the tree structure 2. SchemaGenerator for the schema generation logic 3. SchemaBuilder to manage the public API * rename to_dict() => to_schema() * include backwards compatibility layer * deprecate merge_arrays option * add support for patternProperties * include ``"$schema"`` keyword * accept schemas without ``"type"`` keyword * use ``"anyOf"`` keyword to help combine schemas * add ``SchemaGenerationError`` for better error handling * empty ``"properties"`` and ``"items"`` are not included in generated schemas * ``genson`` executable * new ``--schema-uri`` option * auto-detect object boundaries by default
Bugfixes and Improvements Bugfix: Options were not propagated down to subschemas. Bugfix: Empty arrays resulted in invalid schemas because it still included an items property. Bugfix: items was being set to a list even when merge_arrays was set to True. This resulted in overly permissive schemas because items are matched optionally by default. Improvement: Positional Array Matching - In order to be more consistent with the way JSON Schema works, the alternate to merge_arrays is no longer never to merge list items, but instead to merge them based on their position in the list. Improvement: Schema Incompatibility Warning - A schema incompatibility used to cause a fatal error with a nondescript warning. The message has been improved and it has been reduced to a warning.