Skip to content

Conversation

@mristin
Copy link
Contributor

@mristin mristin commented Jul 7, 2024

We explicitly check during the JSON de-serialization that model types correspond to the expected model types. We need to be particularly careful with concrete classes without descendants with a mandatory modelType, as they do not necessarily require a model type for de-serialization, but the specs mandate it for reasons of backward compatibility.

The code corresponds to aas-core-codegen cd92d208, and the test data corresponds to aas-core3.0-testgen 9e523511c.

This is related to the issue #32, which discovered the problematic in the first place.

We explicitly check during the JSON de-serialization that model types
correspond to the expected model types. We need to be particularly
careful with concrete classes without descendants with a mandatory
``modelType``, as they do not necessarily require a model type for
de-serialization, but the specs mandate it for reasons of backward
compatibility.

The code corresponds to [aas-core-codegen cd92d208], and the test data
corresponds to [aas-core3.0-testgen 9e523511c].

This is related to the issue #32, which discovered the problematic in
the first place.

[aas-core-codegen cd92d208]: aas-core-works/aas-core-codegen@cd92d208
[aas-core3.0-testgen 9e523511c]: aas-core-works/aas-core3.0-testgen@9e523511c
@mristin mristin merged commit 3d29654 into main Jul 7, 2024
@mristin mristin deleted the mristin/Check-explicitly-for-invalid-model-type branch July 7, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants