Fix getter methods for Java model with additionalProperties#301
Fix getter methods for Java model with additionalProperties#301stianlik wants to merge 3 commits intoOpenAPITools:masterfrom stianlik:pr-8245
Conversation
When a model class is configured with additionalProperties, getters for non-dynamic properties always return null because values have been set as properties of the map instead of the class. As a workaround, this commit ensures that we these values are available in getters as well. This fixes #4970, fixes #5259, and fixes #5187
|
cc @bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) for review |
| }) | ||
| ; | ||
| return fireBuilder.createGsonBuilder(); | ||
| GsonBuilder builder = fireBuilder.createGsonBuilder(); |
There was a problem hiding this comment.
This is a change related to one of my other PRs, not sure why it was included here, removed after regenerating samples. Sorry about that.
| }) | ||
| ; | ||
| return fireBuilder.createGsonBuilder(); | ||
| GsonBuilder builder = fireBuilder.createGsonBuilder(); |
It seems that other java clients under
(instead of |
|
It looks like this issue has been resolved differently in openapi-generator. When @jmini @JFCote Can you confirm that the expected behavior is as described above? |
|
I have create a bug for this here: |
See merged PR for swagger-codegen