-
Notifications
You must be signed in to change notification settings - Fork 6k
[QT5CPP] Code generator does not handle the additionalproperties section of the yaml for qt5cpp #6841
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
Comments
@etherealjoy thanks for reporting the issue. Can you please try the below?
|
@wing328 I will try to modify the generator, to see if it works, using the cpprest changes. |
@wing328 OK, I fixed the mustache template for generating the additional properties. https://gist.github.com/etherealjoy/26cb7627a53b3cd18d8440232786d89a Now I discovered another bug. I will create another issue for it. |
Please file a PR with the fix when you've time.
Yes, please and have a nice weekend. |
…is generated. The issue swagger-api#6884 is still present and requires fixing outside of mustache file as well.
* master: (101 commits) [Swift4] Allow for custom dateformatter to be used (swagger-api#6672) [haskell-http-client] fix bug when generating models-only (swagger-api#6931) fix typo: crediential => credential minor typo fix [csharp] fix enum serialization of first value (swagger-api#6873) [PHP] Improve docs and README (swagger-api#6935) Binary mode for file deserialization in python (swagger-api#6936) add python tornado test to travis [Python/tornado] add integration tests and fix bugs (swagger-api#6925) Fix PHP passes response body to ApiException (swagger-api#6923) [TypeScript][Node] Resolve TS2532 error (swagger-api#6932) skip "all" shell script minor formatting change Fixes Issue swagger-api#6841, Map for accessing additionalProperties is generated. (swagger-api#6886) add tsloughter as owner erlang WIP: initial commit for Erlang client generator (swagger-api#6502) add back php client test Switch Travis image from MacOS to Linux (swagger-api#6937) add link to ebook [Scala] Default case class Option types to None for non-required fields (swagger-api#6790) ...
@etherealjoy when you've time, I wonder if you can contact me via my email address on my Github profile. Thanks. |
@etherealjoy sorry, please send me another email again when you've time as I've lost your previous email. |
Uh oh!
There was an error while loading. Please reload this page.
Code generator does not handle the additionalproperties section of the yaml for qt5cpp
Description
Whenever the yaml have additionalProperties the generated code is missing handling for the QMap caused by the arbitrary name of the property.
when the additionalProperties is referencing an array the generated code is also missing handling the QList from the additional property which may then host a normal property.
Swagger-codegen version
The problem is reproducible in v2.2.3 and v3.0.0
It is not a regression.
Swagger declaration file content or url
https://docs.docker.com/engine/api/v1.31/swagger.yaml
Command line used for generation
java -jar /home/dev/swagger-codegen/swagger-codegen-cli-3.0.0-20171009.075709-6.jar generate -i /mnt/YoctoDisk/genivi/genivi-dev-platform/meta-userapp/recipes-dockerctrl/dockerctrl/sources/dockerctrl-qtapp/docker-v132-subset.yaml -o /mnt/YoctoDisk/genivi/genivi-dev-platform/meta-userapp/recipes-dockerctrl/dockerctrl/sources/dockerctrl-qtapp/gen-qt1 -l qt5cpp
java -jar /home/dev/swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i /mnt/YoctoDisk/genivi/genivi-dev-platform/meta-userapp/recipes-dockerctrl/dockerctrl/sources/dockerctrl-qtapp/docker-v132-subset.yaml -o /mnt/YoctoDisk/genivi/genivi-dev-platform/meta-userapp/recipes-dockerctrl/dockerctrl/sources/dockerctrl-qtapp/gen-qt1 -l qt5cpp
Steps to reproduce
Have the yaml code referencing additional properties pointing to an array type, and then the code generation is missing some steps to deserialize the json data.
Related issues/PRs
I have not seen this issue yet in the known issues
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: