Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check explicitly for invalid model types #36

Merged
merged 1 commit into from
Jul 7, 2024

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
8 checks passed
@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.

1 participant