-
-
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
[cpp-qt-client] New makeOperationsVirtual
option
#19613
[cpp-qt-client] New makeOperationsVirtual
option
#19613
Conversation
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.
Looks good, I wonder if it shouldn't be set to true
by default. Both ways are fine for me though.
Thanks for your review. |
Why not just adding the |
My intention is to not break something. Although I don't foreseen problems I may miss something. If you guys think that we can make this behavior default. I'm all for it. |
Thanks for taking consideration into backward compatibility. Upcoming release allows breaking changes with fallbacks so please set the option to true by default and we will see if any user encounters issues with this enhancement. |
@wing328 Thank you for your input. This totally makes sense. |
can you please update the samples (step 3) as well as we should see some changes in the c++ qt petstore client? |
@wing328 Thanks for reminder. It turned out I've made the property |
Happy to see new contributor to the qt cpp generator! 🎉 |
This PR implements new
makeOperationsVirtual
option forcpp-qt-client
generator. If this option has true value then generated operations become virtual. This allows to easily mock up generated code and unit test the code which uses generated classes. You can find example of generated code here as a diff. On the left side the code how it looks like before the changes or with default value of the new option. And on the right side the code how it looks like after the changes and with the option set to true.Fix #19512
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming 7.6.0 minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)@ravinikam @stkrwork @etherealjoy @MartinDelille @muttleyxd