-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
[qt5 server] various improvements #725
[qt5 server] various improvements #725
Conversation
cc @ravinikam @fvarose to review as well |
… qt5server_improvements
For the future I would create some inline functions to clean up the code and make traversing the paths quicker. |
@stkrwork @MartinDelille @ravinikam @fvarose @wing328 |
@etherealjoy I did some comment about minor typo stuff. |
} | ||
List<CodegenParameter> params = new ArrayList<CodegenParameter>(); | ||
if (operation.bodyParam != null)params.add(operation.bodyParam); | ||
if (operation.allParams != null)params.addAll(operation.allParams); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add allParams
and also add query/body/header/query parameters, will params
contain duplicated parameters?
I would also suggest adding a few comments to different code block in this function (postProcessOperations) so as to explain a bit more about the purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh ... does allParams
include everything?
But actually depending on param type I need to check data type.
I will add comments. The goal here is that I consider Qt5 handled data types as native but I need to add the header, whereas default behavior is to not add headers for native types. There is no special handling needed for Qt5 handled types because the framework does everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Search for allParams
in that code block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I have removed the duplicated parameters and added comments
…server_improvements
Resolved merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@etherealjoy thanks again for the PR, which has been included in the v3.2.3 release: https://twitter.com/oas_generator/status/1035200785066254336 |
* Improve handling of all primitive types * Fix missing includes in case of simple APIs * Fix minor error in template function * Remove tabs * Refactor code for simplicity * Remove tabs * rework the router for handling multiple path param * rework router to handle multiple path parameters * rework router to handle multiple path parameters * rework router * Add support for Multi path param * Add comments to code block and remove duplicate parameters * Remove tabs :( * Add missing imports after resolving conflict
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,4.0.x
. Default:master
.Description of the PR
@stkrwork @MartinDelille @ravinikam @fvarose