You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, I didn't realize that submitted : / ... Please see revised issue above.
Since the proposed fix, although small, could have a large impact, feedback about the change would be good. I am simply not familiar enough with the code to full understand the the ramifications of a change to the toDefaultValue method.
I am currently waiting to see if anything else comes up as other folks use my patched build. So far, things seem okay though.
Bug Report Checklist
Description
Run time error occurs because default type is set to nullptr. This breaks the fromJSON and toJSON methods in model-source.mustache.
openapi-generator version
4.1.0-SNAPSHOT
OpenAPI declaration file content or url
See test.json: https://gist.github.com/dan-drl/147e962298d1f1467638c00786cd9b6f
See resulting c++: https://gist.github.com/dan-drl/0ec11853c939d5d05ab3c2699238d324
Command line used for generation
java -jar openapi-generator-cli.jar generate -i test.json -g cpp-restsdk -o \src\test
Steps to reproduce
If a JSON containing a "value":null is provided to the AdditionalField model for deserialization, a runtime error occurs because of this:
Related issues/PRs
I didn't find anything.
Suggest a fix
Planning on making a pull request. See this commit, dan-drl@7b42948
The text was updated successfully, but these errors were encountered: