You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just bumped "@asyncapi/cli": "2.14.1" to "@asyncapi/cli": "2.16.0" and was surprised to see my tests fail, cuz I didn't see any relevant changes in the release notes.
What I found was that there are now serializers and validators, which seems fine, but asyncapi generate models python doc/asyncapi.yaml --pyDantic generates broken code now:
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Moved to modelina as model generation comes from here, but to be honest, I don't know why errors are in CLI now as there was no upgrade of modelina CLI in asyncapi CLI for a while
Looks like this bug has been introduced with e9e46b3 two days ago o_Ò
My package-lock lists modelina with 4.0.0+
So the second time default=None is set would only cover the case where !required && !isNullable, which seems just wrong to me. If it's not nullable the default cannot be None (read: null) regardless of whether it's required or not.
Hence, I guess the fix would be to just drop L62-64.
Describe the bug.
I just bumped
"@asyncapi/cli": "2.14.1"
to"@asyncapi/cli": "2.16.0"
and was surprised to see my tests fail, cuz I didn't see any relevant changes in the release notes.What I found was that there are now serializers and validators, which seems fine, but
asyncapi generate models python doc/asyncapi.yaml --pyDantic
generates broken code now:The kwarg
default
is repeated everywhere.(It also has some unused imports, which bugs me a little :D)
Expected behavior
Generates valid Python code.
Screenshots
How to Reproduce
$ref
https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/formats/cloudevents.json🥦 Browser
None
👀 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: