Skip to content
Snippets Groups Projects
Verified Commit 6bb3323f authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOC: Docstrings.

parent 5dc99c61
No related branches found
No related tags found
2 merge requests!89ENH: JsonSchemaExporter accepts do_not_create parameter.,!83ENH: JsonSchemaExporter can merge schemata and arrayize them
Pipeline #43228 passed
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
# with this program. If not, see <https://www.gnu.org/licenses/>. # with this program. If not, see <https://www.gnu.org/licenses/>.
# #
"""Module for converting a data model into a json schema compatible dictionary. """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 from collections import OrderedDict
...@@ -47,8 +49,8 @@ class JsonSchemaExporter: ...@@ -47,8 +49,8 @@ class JsonSchemaExporter:
Whether additional properties will be admitted in the resulting Whether additional properties will be admitted in the resulting
schema. Optional, default is True. schema. Optional, default is True.
name_and_description_in_properties : bool, optional name_and_description_in_properties : bool, optional
Whether to include name and description in the `properties` section of Whether object which are generated from reference properties shall have a `name` and
the schema to be exported. Optional, default is False. `description` property in the generated schema. Optional, default is False.
additional_options_for_text_props : dict, optional additional_options_for_text_props : dict, optional
Dictionary containing additional "pattern" or "format" options for Dictionary containing additional "pattern" or "format" options for
string-typed properties. Optional, default is empty. string-typed properties. Optional, default is empty.
...@@ -290,8 +292,8 @@ def recordtype_to_json_schema(rt: db.RecordType, additional_properties: bool = T ...@@ -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 Whether additional properties will be admitted in the resulting
schema. Optional, default is True. schema. Optional, default is True.
name_and_description_in_properties : bool, optional name_and_description_in_properties : bool, optional
Whether to include name and description in the `properties` section of Whether object which are generated from reference properties shall have a `name` and
the schema to be exported. Optional, default is False. `description` property in the generated schema. Optional, default is False.
additional_options_for_text_props : dict, optional additional_options_for_text_props : dict, optional
Dictionary containing additional "pattern" or "format" options for Dictionary containing additional "pattern" or "format" options for
string-typed properties. Optional, default is empty. string-typed properties. Optional, default is empty.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment