-
Notifications
You must be signed in to change notification settings - Fork 137
fixing nullable handing in "normalizer" for nullable properties, fix condition for nullable properties #841
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
Conversation
Example for "deactivated" that has "nullable" (null|DateTime) value: without my fixes:
with my fixes: So i'm able to set "deactivated" to null via api call |
Hey @tecbird, thanks for your change ! Could you rebase your change onto |
Hey @Korbeil, I pushed a rebase and will add a test soon ✌️ |
Hey @Korbeil, I added a test case for a nullable date-time property. Sorry for that massive diff but as you can see there ware many generated normalizers affected (most in issue-445 based PictureparkSwagger.json and github) |
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.
Thanks for your changes ! 🙏
Mmmmm I cannot fixes conflicts since I do not have rights to push to your branch, could you fix them please ? 🙏 |
the current generated "expected" code had bugs
…ime" type dateNullableProperty
Hey @Korbeil I rebased it and added a changelog entry ✌️ |
CHANGELOG.md
Outdated
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
- [CI] [GH#850](https://github.com/janephp/janephp/pull/850) Update GH actions/cache to v4 | |||
- [OpenApi] [GH#845](https://github.com/janephp/janephp/pull/845) Content */* breaks generated Endpoint PHP class | |||
- [JsonSchema] [GH#846](https://github.com/janephp/janephp/pull/846) Cast integer data to bool for boolean fields when integer is in data | |||
- [JsonSchema] [GH#841](https://github.com/janephp/janephp/pull/841) Fix "nullable" property handing in generated normalizers |
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.
Please put it under the "Unreleased" section 🙏
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.
Fixed ✌️
Thanks @Fahl-Design & @tecbird for your contribution ! 🙏 |
OpenAPI 3.0.x
code currently not working to set "null" in nullable properties
type: string nullable: true