-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Cpp boost beast client redux #20971
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
base: master
Are you sure you want to change the base?
Cpp boost beast client redux #20971
Conversation
Fix maven pom
* Fixed names of the approval files for ApiTests. * Silence warnings due to boost/property_tree/json_parser.hpp * ApprovalTests only works when not using header-only boost::test * More clean shutdown of imposter when test(s) fail * Update petstore-config.yaml test config to add explicit values for all tested enpoints, rather than relying on imposter-provided default values. As of v4.5.2, imposter's defaults have changed. * Fixed CppBoostBeastClientCodegen compilation error triggered by refactoring of getAdditionalProperties(Schema) -> ModelUtils.
@@ -0,0 +1,6 @@ | |||
generatorName: cpp-boost-beast-client | |||
outputDir: samples/client/petstore/cpp-boost-beast/generated |
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 for the PR
how did you test the output in this new folder?
I tried running build-and-test.bash
but got errors.
please PM me via Slack when you've time to collaborate on this PR thanks again for the contribution https://join.slack.com/t/openapi-generator/shared_invite/zt-2wmkn4s8g-n19PJ99Y6Vei74WMUIehQA |
C++ Boost Beast client code generator (take 2)
Minor updates to original PR#12197 by LukasWoodtli. Includes various fixes so that sample/integration tests succeed, including updates required due to ongoing changes in openapi-generator, as well as changes in the "imposter" tool used by the tests. Also, rebased to current HEAD of master branch.
Generated example code is committed under the samples directory and integration tests are also available there. To build the sample and run the tests within the devcontainer:
Note that once the samples are compiled, the test procedure will use
imposter-cli
to spin up a mock server based on the petstore.yaml, but with pre-scripted responses to various queries in the test program. Spinning up this server takes a bit of time, since on first invocation it has todocker pull
a fairly large image: outofcoffee/imposter. Once the mock server is finally running, vscode will show a popup that the server is listening on port 8080, and then the test will (automatically) continue.I don't want to take credit away from Lukas Woodtli, who did the original work on this PR. I resurrected it because I wanted to see a C++ generator that (a) did not depend on a now-retired library cpprestsdk, nor (b) require an Xserver to operate (the qt client links against the QT GUI library for some reason).
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
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)@ravinikam
@stkrwork
@etherealjoy
@MartinDelille
@muttleyxd