-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add nullability annotations in generated Java code #63
Comments
If I could get support from my employer to have someone contribute this, is there someone around here to accept a PR? Looks like the last PR merged in this repo was June 2021. |
Is the ask here to make it possible to customize what annotations jtd-codegen would use to indicate nullable/non-nullable fields? And yes, I can accept PRs. |
In short, yes. The immediate goal is to have a way to add nullability annotations that allow the Kotlin compiler, when reading Java code generated by These would need to be in addition to the existing Jackson annotations. Customizable sets of annotations for nullable/non-nullable is perhaps the best way to do this as it would enable other use cases. That said, a simple on/off switch for one predetermined type of nullability annotation (from the list linked above) would also achieve the goal, if we could identify one that made sense as a de-facto standard or most commonly used. Do you have a preference? |
Generated Java code would have better null safety when used in Kotlin if there were an option to add nullability annotations
The text was updated successfully, but these errors were encountered: