Skip to content

Conversation

rickyma
Copy link
Contributor

@rickyma rickyma commented Mar 10, 2025

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in Git BASH)
    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.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
    @ravinikam @stkrwork @etherealjoy @MartinDelille @muttleyxd

@rickyma
Copy link
Contributor Author

rickyma commented Mar 10, 2025

A better way to fix: #10301

@rickyma
Copy link
Contributor Author

rickyma commented Mar 25, 2025

Without this PR, using enums as HTTP GET request parameters, errors will occur when compiling the source code generated by cpprestsdk. Anyone please take a look.

@wing328
Copy link
Member

wing328 commented Apr 25, 2025

thanks for the PR

what about add a fake endpoint to modules/openapi-generator/src/test/resources/3_0/cpp-restsdk/petstore.yaml to test enum request parameters and update the samples (step 3 in PR checklist, make sure to run the command twice) ?

@rickyma
Copy link
Contributor Author

rickyma commented Apr 28, 2025

@wing328 PTAL

@wing328
Copy link
Member

wing328 commented Apr 28, 2025

please update modules/openapi-generator/src/test/resources/3_0/cpp-restsdk/petstore.yaml (as mentioned earlier) instead of the common one used by other generators for testing

@rickyma
Copy link
Contributor Author

rickyma commented Apr 28, 2025

Done. PTAL again, thx. @wing328

@wing328
Copy link
Member

wing328 commented Apr 28, 2025

https://github.com/OpenAPITools/openapi-generator/actions/runs/14703025058/job/41259693532?pr=20836

please update the samples again to fix the above error

@rickyma
Copy link
Contributor Author

rickyma commented Apr 29, 2025

Done. Up to date with master. @wing328

@wing328
Copy link
Member

wing328 commented Apr 29, 2025

tested locally and the result is good

[ 84%] Building CXX object CMakeFiles/CppRestPetstoreClient.dir/src/model/SchemaWithSet_vaccinationBook.cpp.o
[ 88%] Building CXX object CMakeFiles/CppRestPetstoreClient.dir/src/model/Tag.cpp.o
[ 92%] Building CXX object CMakeFiles/CppRestPetstoreClient.dir/src/model/User.cpp.o
[ 96%] Building CXX object CMakeFiles/CppRestPetstoreClient.dir/src/model/Vaccine.cpp.o
[100%] Linking CXX static library libCppRestPetstoreClient.a
[100%] Built target CppRestPetstoreClient

@wing328 wing328 merged commit afa135f into OpenAPITools:master Apr 29, 2025
15 checks passed
@wing328 wing328 added this to the 7.14.0 milestone Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants