From a817567a96c917ca089b30987079db88e11a6041 Mon Sep 17 00:00:00 2001 From: Marko Ristin Date: Sun, 7 Jul 2024 11:57:58 +0200 Subject: [PATCH] Check explicitly for missing model type We add an explicit check for missing ``modelType`` to account for the case where a concrete class without descendants needs a model type for backwards compatibility even though the model type property is redundant. The code corresponds to [aas-core-codegen 84ccbb64], and the test data correspods to [aas-core3.0-testgen 1b00dbe45]. [aas-core-codegen 84ccbb64]: https://github.com/aas-core-works/aas-core-codegen/commit/84ccbb64 [aas-core3.0-testgen 1b00dbe45]: https://github.com/aas-core-works/aas-core3.0-testgen/commit/1b00dbe45 Fixes #32. --- aas_core3/jsonization.py | 85 +++++++++++++++++++ .../withoutModelType.json | 31 +++++++ .../withoutModelType.json.exception | 1 + .../withoutModelType.json | 11 +++ .../withoutModelType.json.exception | 1 + .../BasicEventElement/withoutModelType.json | 24 ++++++ .../withoutModelType.json.exception | 1 + .../Blob/withoutModelType.json | 14 +++ .../Blob/withoutModelType.json.exception | 1 + .../Capability/withoutModelType.json | 13 +++ .../withoutModelType.json.exception | 1 + .../ConceptDescription/withoutModelType.json | 7 ++ .../withoutModelType.json.exception | 1 + .../withoutModelType.json | 29 +++++++ .../withoutModelType.json.exception | 1 + .../Entity/withoutModelType.json | 14 +++ .../Entity/withoutModelType.json.exception | 1 + .../File/withoutModelType.json | 14 +++ .../File/withoutModelType.json.exception | 1 + .../withoutModelType.json | 13 +++ .../withoutModelType.json.exception | 1 + .../Operation/withoutModelType.json | 13 +++ .../Operation/withoutModelType.json.exception | 1 + .../Property/withoutModelType.json | 14 +++ .../Property/withoutModelType.json.exception | 1 + .../Range/withoutModelType.json | 14 +++ .../Range/withoutModelType.json.exception | 1 + .../ReferenceElement/withoutModelType.json | 13 +++ .../withoutModelType.json.exception | 1 + .../RelationshipElement/withoutModelType.json | 31 +++++++ .../withoutModelType.json.exception | 1 + .../Submodel/withoutModelType.json | 7 ++ .../Submodel/withoutModelType.json.exception | 1 + .../withoutModelType.json | 13 +++ .../withoutModelType.json.exception | 1 + .../SubmodelElementList/withoutModelType.json | 14 +++ .../withoutModelType.json.exception | 1 + 37 files changed, 392 insertions(+) create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AnnotatedRelationshipElement/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AnnotatedRelationshipElement/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AssetAdministrationShell/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AssetAdministrationShell/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/BasicEventElement/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/BasicEventElement/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Blob/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Blob/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Capability/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Capability/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ConceptDescription/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ConceptDescription/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/DataSpecificationIec61360/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/DataSpecificationIec61360/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Entity/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Entity/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/File/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/File/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/MultiLanguageProperty/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/MultiLanguageProperty/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Operation/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Operation/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Property/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Property/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Range/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Range/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ReferenceElement/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ReferenceElement/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/RelationshipElement/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/RelationshipElement/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Submodel/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Submodel/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementCollection/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementCollection/withoutModelType.json.exception create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementList/withoutModelType.json create mode 100644 test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementList/withoutModelType.json.exception diff --git a/aas_core3/jsonization.py b/aas_core3/jsonization.py index 0b3e7fc8..ba948f4b 100644 --- a/aas_core3/jsonization.py +++ b/aas_core3/jsonization.py @@ -1114,6 +1114,11 @@ def asset_administration_shell_from_jsonable( setter = _SetterForAssetAdministrationShell() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_ASSET_ADMINISTRATION_SHELL.get(key) if setter_method is None: @@ -1709,6 +1714,11 @@ def submodel_from_jsonable(jsonable: Jsonable) -> aas_types.Submodel: setter = _SetterForSubmodel() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_SUBMODEL.get(key) if setter_method is None: @@ -2364,6 +2374,11 @@ def submodel_element_list_from_jsonable( setter = _SetterForSubmodelElementList() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_SUBMODEL_ELEMENT_LIST.get(key) if setter_method is None: @@ -2631,6 +2646,11 @@ def submodel_element_collection_from_jsonable( setter = _SetterForSubmodelElementCollection() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_SUBMODEL_ELEMENT_COLLECTION.get(key) if setter_method is None: @@ -2921,6 +2941,11 @@ def property_from_jsonable(jsonable: Jsonable) -> aas_types.Property: setter = _SetterForProperty() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_PROPERTY.get(key) if setter_method is None: @@ -3193,6 +3218,11 @@ def multi_language_property_from_jsonable( setter = _SetterForMultiLanguageProperty() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_MULTI_LANGUAGE_PROPERTY.get(key) if setter_method is None: @@ -3452,6 +3482,11 @@ def range_from_jsonable(jsonable: Jsonable) -> aas_types.Range: setter = _SetterForRange() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_RANGE.get(key) if setter_method is None: @@ -3697,6 +3732,11 @@ def reference_element_from_jsonable(jsonable: Jsonable) -> aas_types.ReferenceEl setter = _SetterForReferenceElement() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_REFERENCE_ELEMENT.get(key) if setter_method is None: @@ -3946,6 +3986,11 @@ def blob_from_jsonable(jsonable: Jsonable) -> aas_types.Blob: setter = _SetterForBlob() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_BLOB.get(key) if setter_method is None: @@ -4199,6 +4244,11 @@ def file_from_jsonable(jsonable: Jsonable) -> aas_types.File: setter = _SetterForFile() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_FILE.get(key) if setter_method is None: @@ -4479,6 +4529,11 @@ def annotated_relationship_element_from_jsonable( setter = _SetterForAnnotatedRelationshipElement() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_ANNOTATED_RELATIONSHIP_ELEMENT.get(key) if setter_method is None: @@ -4786,6 +4841,11 @@ def entity_from_jsonable(jsonable: Jsonable) -> aas_types.Entity: setter = _SetterForEntity() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_ENTITY.get(key) if setter_method is None: @@ -5326,6 +5386,11 @@ def basic_event_element_from_jsonable( setter = _SetterForBasicEventElement() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_BASIC_EVENT_ELEMENT.get(key) if setter_method is None: @@ -5648,6 +5713,11 @@ def operation_from_jsonable(jsonable: Jsonable) -> aas_types.Operation: setter = _SetterForOperation() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_OPERATION.get(key) if setter_method is None: @@ -5932,6 +6002,11 @@ def capability_from_jsonable(jsonable: Jsonable) -> aas_types.Capability: setter = _SetterForCapability() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_CAPABILITY.get(key) if setter_method is None: @@ -6148,6 +6223,11 @@ def concept_description_from_jsonable( setter = _SetterForConceptDescription() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_CONCEPT_DESCRIPTION.get(key) if setter_method is None: @@ -7415,6 +7495,11 @@ def data_specification_iec_61360_from_jsonable( setter = _SetterForDataSpecificationIEC61360() + if "modelType" not in jsonable: + raise DeserializationException( + "Expected the property modelType, but found none" + ) + for key, jsonable_value in jsonable.items(): setter_method = _SETTER_MAP_FOR_DATA_SPECIFICATION_IEC_61360.get(key) if setter_method is None: diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AnnotatedRelationshipElement/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AnnotatedRelationshipElement/withoutModelType.json new file mode 100644 index 00000000..27380ee0 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AnnotatedRelationshipElement/withoutModelType.json @@ -0,0 +1,31 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "first": { + "keys": [ + { + "type": "GlobalReference", + "value": "urn:another-company01:f390f801" + } + ], + "type": "ExternalReference" + }, + "idShort": "something3fdd3eb4", + "second": { + "keys": [ + { + "type": "GlobalReference", + "value": "urn:an-example05:b7bf2725" + } + ], + "type": "ExternalReference" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AnnotatedRelationshipElement/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AnnotatedRelationshipElement/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AnnotatedRelationshipElement/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AssetAdministrationShell/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AssetAdministrationShell/withoutModelType.json new file mode 100644 index 00000000..06ae9a13 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AssetAdministrationShell/withoutModelType.json @@ -0,0 +1,11 @@ +{ + "assetAdministrationShells": [ + { + "assetInformation": { + "assetKind": "NotApplicable", + "globalAssetId": "something_eea66fa1" + }, + "id": "something_142922d6" + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AssetAdministrationShell/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AssetAdministrationShell/withoutModelType.json.exception new file mode 100644 index 00000000..6be2e1c7 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/AssetAdministrationShell/withoutModelType.json.exception @@ -0,0 +1 @@ +assetAdministrationShells[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/BasicEventElement/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/BasicEventElement/withoutModelType.json new file mode 100644 index 00000000..af94b596 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/BasicEventElement/withoutModelType.json @@ -0,0 +1,24 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "direction": "output", + "idShort": "something3fdd3eb4", + "observed": { + "keys": [ + { + "type": "Submodel", + "value": "urn:another-example11:3679ef43" + } + ], + "type": "ModelReference" + }, + "state": "off" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/BasicEventElement/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/BasicEventElement/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/BasicEventElement/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Blob/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Blob/withoutModelType.json new file mode 100644 index 00000000..0a0cbb26 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Blob/withoutModelType.json @@ -0,0 +1,14 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "contentType": "'VbrwFrYTU/fO7NnLxq \t; \tMX.`10dB732`X5yRy=I56Ov9Us\t ;\t\t pRb~~hdw_C%2Zf=\"\"\t\t\t \t\t\t \t \t\t \t ; h=1t", + "idShort": "something3fdd3eb4" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Blob/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Blob/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Blob/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Capability/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Capability/withoutModelType.json new file mode 100644 index 00000000..924ac87c --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Capability/withoutModelType.json @@ -0,0 +1,13 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "idShort": "something3fdd3eb4" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Capability/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Capability/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Capability/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ConceptDescription/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ConceptDescription/withoutModelType.json new file mode 100644 index 00000000..187cf777 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ConceptDescription/withoutModelType.json @@ -0,0 +1,7 @@ +{ + "conceptDescriptions": [ + { + "id": "something_8ccad77f" + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ConceptDescription/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ConceptDescription/withoutModelType.json.exception new file mode 100644 index 00000000..96f0ab46 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ConceptDescription/withoutModelType.json.exception @@ -0,0 +1 @@ +conceptDescriptions[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/DataSpecificationIec61360/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/DataSpecificationIec61360/withoutModelType.json new file mode 100644 index 00000000..d778f234 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/DataSpecificationIec61360/withoutModelType.json @@ -0,0 +1,29 @@ +{ + "assetAdministrationShells": [ + { + "assetInformation": { + "assetKind": "NotApplicable", + "globalAssetId": "something_eea66fa1" + }, + "embeddedDataSpecifications": [ + { + "dataSpecificationContent": { + "preferredName": [ + { + "language": "i-enochian", + "text": "something_84b0b440" + }, + { + "language": "en-GB", + "text": "Something random in English 5b15c20d" + } + ], + "value": "something_13759f45" + } + } + ], + "id": "something_142922d6", + "modelType": "AssetAdministrationShell" + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/DataSpecificationIec61360/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/DataSpecificationIec61360/withoutModelType.json.exception new file mode 100644 index 00000000..0f39223e --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/DataSpecificationIec61360/withoutModelType.json.exception @@ -0,0 +1 @@ +assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Entity/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Entity/withoutModelType.json new file mode 100644 index 00000000..56eab540 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Entity/withoutModelType.json @@ -0,0 +1,14 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "entityType": "CoManagedEntity", + "idShort": "something3fdd3eb4" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Entity/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Entity/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Entity/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/File/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/File/withoutModelType.json new file mode 100644 index 00000000..0a0cbb26 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/File/withoutModelType.json @@ -0,0 +1,14 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "contentType": "'VbrwFrYTU/fO7NnLxq \t; \tMX.`10dB732`X5yRy=I56Ov9Us\t ;\t\t pRb~~hdw_C%2Zf=\"\"\t\t\t \t\t\t \t \t\t \t ; h=1t", + "idShort": "something3fdd3eb4" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/File/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/File/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/File/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/MultiLanguageProperty/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/MultiLanguageProperty/withoutModelType.json new file mode 100644 index 00000000..924ac87c --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/MultiLanguageProperty/withoutModelType.json @@ -0,0 +1,13 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "idShort": "something3fdd3eb4" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/MultiLanguageProperty/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/MultiLanguageProperty/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/MultiLanguageProperty/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Operation/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Operation/withoutModelType.json new file mode 100644 index 00000000..924ac87c --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Operation/withoutModelType.json @@ -0,0 +1,13 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "idShort": "something3fdd3eb4" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Operation/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Operation/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Operation/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Property/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Property/withoutModelType.json new file mode 100644 index 00000000..b071673f --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Property/withoutModelType.json @@ -0,0 +1,14 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "idShort": "something3fdd3eb4", + "valueType": "xs:decimal" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Property/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Property/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Property/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Range/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Range/withoutModelType.json new file mode 100644 index 00000000..b071673f --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Range/withoutModelType.json @@ -0,0 +1,14 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "idShort": "something3fdd3eb4", + "valueType": "xs:decimal" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Range/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Range/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Range/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ReferenceElement/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ReferenceElement/withoutModelType.json new file mode 100644 index 00000000..924ac87c --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ReferenceElement/withoutModelType.json @@ -0,0 +1,13 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "idShort": "something3fdd3eb4" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ReferenceElement/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ReferenceElement/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/ReferenceElement/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/RelationshipElement/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/RelationshipElement/withoutModelType.json new file mode 100644 index 00000000..27380ee0 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/RelationshipElement/withoutModelType.json @@ -0,0 +1,31 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "first": { + "keys": [ + { + "type": "GlobalReference", + "value": "urn:another-company01:f390f801" + } + ], + "type": "ExternalReference" + }, + "idShort": "something3fdd3eb4", + "second": { + "keys": [ + { + "type": "GlobalReference", + "value": "urn:an-example05:b7bf2725" + } + ], + "type": "ExternalReference" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/RelationshipElement/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/RelationshipElement/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/RelationshipElement/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Submodel/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Submodel/withoutModelType.json new file mode 100644 index 00000000..b4be2818 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Submodel/withoutModelType.json @@ -0,0 +1,7 @@ +{ + "submodels": [ + { + "id": "something_48c66017" + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Submodel/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Submodel/withoutModelType.json.exception new file mode 100644 index 00000000..7d69019f --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/Submodel/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementCollection/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementCollection/withoutModelType.json new file mode 100644 index 00000000..924ac87c --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementCollection/withoutModelType.json @@ -0,0 +1,13 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "idShort": "something3fdd3eb4" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementCollection/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementCollection/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementCollection/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementList/withoutModelType.json b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementList/withoutModelType.json new file mode 100644 index 00000000..993d37c9 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementList/withoutModelType.json @@ -0,0 +1,14 @@ +{ + "submodels": [ + { + "id": "something_48c66017", + "modelType": "Submodel", + "submodelElements": [ + { + "idShort": "something3fdd3eb4", + "typeValueListElement": "Entity" + } + ] + } + ] +} \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementList/withoutModelType.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementList/withoutModelType.json.exception new file mode 100644 index 00000000..79888192 --- /dev/null +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/MissingModelType/SubmodelElementList/withoutModelType.json.exception @@ -0,0 +1 @@ +submodels[0].submodelElements[0]: Expected the property modelType, but found none \ No newline at end of file