diff --git a/src/caosadvancedtools/json_schema_exporter.py b/src/caosadvancedtools/json_schema_exporter.py index cfe17dbae722c27704f7113e4fc8db7963fa8345..4f331585e3bbbfd5eed3b2d22b573f2d3d60cb56 100644 --- a/src/caosadvancedtools/json_schema_exporter.py +++ b/src/caosadvancedtools/json_schema_exporter.py @@ -22,7 +22,7 @@ """Module for converting a data model into a json schema compatible dictionary. """ -from typing import Any, Optional +from typing import Any, List, Optional import linkahead as db from linkahead.common.datatype import get_list_datatype, is_list_datatype @@ -36,7 +36,7 @@ class JsonSchemaExporter: name_and_description_in_properties: bool = False, additional_options_for_text_props: dict = None, units_in_description: bool = True, - do_not_create: list[str] = None, + do_not_create: List[str] = None, ): """Set up a JsonSchemaExporter, which can then be applied on RecordTypes. @@ -272,7 +272,7 @@ def recordtype_to_json_schema(rt: db.RecordType, additional_properties: bool = T name_and_description_in_properties: bool = False, additional_options_for_text_props: Optional[dict] = None, units_in_description: bool = True, - do_not_create: list[str] = None): + do_not_create: List[str] = None): """Create a jsonschema from a given RecordType that can be used, e.g., to validate a json specifying a record of the given type.