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 #35

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

mristin
Copy link
Contributor

@mristin mristin commented Jul 20, 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 56482d65, and the test data corresponds to aas-core3.0-testgen 9e523511c.

This is related to the issue aas-core3.0-python #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 56482d65], and the test data
corresponds to [aas-core3.0-testgen 9e523511c].

This is related to the issue [aas-core3.0-python #32], which discovered
the problematic in the first place.

[aas-core-codegen 56482d65]: aas-core-works/aas-core-codegen@56482d65
[aas-core3.0-testgen 9e523511c]: aas-core-works/aas-core3.0-testgen@9e523511c
[aas-core3.0-python #32]: aas-core-works/aas-core3.0-python#32
@mristin mristin merged commit 8f72a15 into main Jul 20, 2024
1 check passed
@mristin mristin deleted the mristin/Check-for-modelType-explicitly-in-JSON branch July 20, 2024 08:27
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