Skip to content
Snippets Groups Projects

ENH: JsonSchemaExporter can merge schemata and arrayize them

Merged Daniel Hornung requested to merge f-more-jsonschema-export into dev
1 unresolved thread
@@ -20,6 +20,8 @@
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
"""Module for converting a data model into a json schema compatible dictionary.
The scope of this json schema is the automatic generation of user interfaces.
"""
from collections import OrderedDict
@@ -47,8 +49,8 @@ class JsonSchemaExporter:
Whether additional properties will be admitted in the resulting
schema. Optional, default is True.
name_and_description_in_properties : bool, optional
Whether to include name and description in the `properties` section of
the schema to be exported. Optional, default is False.
Whether object which are generated from reference properties shall have a `name` and
`description` property in the generated schema. Optional, default is False.
additional_options_for_text_props : dict, optional
Dictionary containing additional "pattern" or "format" options for
string-typed properties. Optional, default is empty.
@@ -290,8 +292,8 @@ def recordtype_to_json_schema(rt: db.RecordType, additional_properties: bool = T
Whether additional properties will be admitted in the resulting
schema. Optional, default is True.
name_and_description_in_properties : bool, optional
Whether to include name and description in the `properties` section of
the schema to be exported. Optional, default is False.
Whether object which are generated from reference properties shall have a `name` and
`description` property in the generated schema. Optional, default is False.
additional_options_for_text_props : dict, optional
Dictionary containing additional "pattern" or "format" options for
string-typed properties. Optional, default is empty.
Loading