-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
[BUG] Pydantic, removal of alias breaks code #2187
Comments
@memdal could you elaborate why |
Looking at https://github.com/asyncapi/modelina/pull/2111/files#diff-e4313dba292240670e96b378fd98fa02d9dd6a0e7b96153c03787ee71904339fL60 that is definitely not supposed to be removed. Do you mind raising a PR @black-snow? |
@jonaslagoni thanks for checking. Sure, will do as soon as I can. Is there a list of breaking changes with 4.x hidden anywhere? How can we prevent surprising breaking changes in the future - especially with the asyncAPI cli? |
Every breaking change is always described in the migration doc: https://github.com/asyncapi/modelina/blob/master/docs/migrations/version-3-to-4.md If nothing is described and is broken, it is an unintended breaking change for sure. However, it looks like there was some stuff about alias python: https://github.com/asyncapi/modelina/blob/master/docs/migrations/version-3-to-4.md#pydantic-now-follows-v2-instead-of-v1 Does it make sense to you? |
Ah great, so we have a guide - we should probs link this to the 4.0.0 release notes then. |
Good idea, done 👍 |
Describe the bug.
Following up on #2174 because the cause seems to be the same changes - especially e9e46b3#diff-e4313dba292240670e96b378fd98fa02d9dd6a0e7b96153c03787ee71904339fL52
Comparing the freshly generated models with my existing ones, I see that
becomes
with
So the alias got removed. Sadly, this ain't no no-op change but a change in behaviour. Many tests fail now, especially when I
model_validate_json(some_json)
.This seems to be the corresponding PR. Sadly, the 4.0.0 release just says "breaking changes!" but doesn't list them. Overall, this is a bad experience - especially since I don't use modelina directly but asyncAPI cli, which just upgraded to 4.x in a non-major update. So I bump the CLI expecting things to just work but stuff keeps blowing up :/
Expected behavior
alias
should not have been removed (I don't understand the reason in the PR) ORScreenshots
How to Reproduce
model_validate_json()
from a string with said camelCase property🥦 Browser
Mozilla Firefox
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: