-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
fix: set default to None for pydantic generator #1663
fix: set default to None for pydantic generator #1663
Conversation
✅ Deploy Preview for modelina canceled.
|
c7c3351
to
b2c7706
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got some build and test problems, should be an easy fix. Let me know if you need anything 😄
b2c7706
to
e984b0c
Compare
Oh I see, I was not aware about the tests. Just updated the snapshots to work and added in same commit. Thanks for helping. |
@Harshil-Jani remember to do the same for the examples ✌️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to update the examples npm run test:examples:update
🙂
@jonaslagoni On it. Sorry for the delay. Will be fixing it right in next few hours. |
a6b524d
to
b519dee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 💪
/rtm |
Pull Request Test Coverage Report for Build 7265950504
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now a few linting problems 😄
@jonaslagoni Is there a way I can test the run locally on my system for linting, examples, tests all using a single command ? This way, It would be a lot easier for you to maintain 😢. And also this would reduce the actions ran on the CI. Or if it is not possible with just one command then maybe having it on the PR checklist would ensure that new contributors actually run things locally and pass tests or linting errors. |
We actually dont 🤔 |
Sure. I will fix the linting errors and add the Checklist in yaml file for PRs. |
- fix in Pydantic Python Generator for optional values. - default=None should be added in `Field()` if the property is optional. - updated the test snapshot to compare the new default value argument. Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
74f1915
to
1643da1
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
/rtm |
🎉 This PR is included in version 2.0.14 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@all-contributors please add @Harshil-Jani for code and test |
I've put up a pull request to add @Harshil-Jani! 🎉 |
🎉 This PR is included in version 3.0.0-next.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In pydantic based python generator, when the optional values are passed, they need to be passed with an
default=None
argument in Field().Related issue(s)
Fixes #1644