-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Builders do not preserve additionalProperties #3570
Comments
Is this something that needs to be fixed here or in Sundrio? A reproducer example, or ignored test would be useful. |
I think here. There's no constructor nor setter for the building logic to use to convey the additionalProperties. If I modify Pod.java to have a setter, the the fluent / builder is updated appropriately. |
I think jsonschema2pojo is in charge of generating the additionalProperties field and related methods (property setter, and getter). I'm not sure if this can be tweaked to be able to add a normal setter too and prevent the problem. But if there's no option, it seems like a hard problem to tackle then. And I think the issue is similar for the constructor. |
We can try to implement an extra rule (jsonschema2pojo) to complement the We already have some custom rules to fix the naming convention (#2639) |
When using a builder and you use a withXXX to associate another object - under the covers the a copy is made via a constructor that omits the additional properties.
The text was updated successfully, but these errors were encountered: