Skip to content
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-rest] better handling of property name with special characters #12288

Merged

Conversation

kesheshyan
Copy link
Contributor

@kesheshyan kesheshyan commented May 3, 2022

Issue:

#12289

Fix for cpp-rest-sdk-client generator producing uncompilable code if there is a "-" (or other characters like a space etc.) in a property name of an object.

PR checklist

…there is a "-" (or other characters like a space etc.) in a property name of an object.
@wing328
Copy link
Member

wing328 commented May 3, 2022

Tested locally with updated samples and the result is good:

/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 83%] Building CXX object CMakeFiles/CppRestPetstoreClient.dir/src/model/Pet.cpp.o
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 88%] Building CXX object CMakeFiles/CppRestPetstoreClient.dir/src/model/Tag.cpp.o
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 94%] Building CXX object CMakeFiles/CppRestPetstoreClient.dir/src/model/User.cpp.o
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[100%] Linking CXX static library libCppRestPetstoreClient.a
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[100%] Built target CppRestPetstoreClient
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:39 min
[INFO] Finished at: 2022-05-03T11:22:43+08:00
[INFO] ------------------------------------------------------------------------

Thanks for the fix.

@wing328 wing328 merged commit c176790 into OpenAPITools:master May 3, 2022
@wing328
Copy link
Member

wing328 commented May 3, 2022

FYI. Samples updated via 1e48c95

@wing328 wing328 changed the title Fix for cpp-rest-sdk-client generator producing uncompilable code [cpp-rest] better handling of property name with special characters May 22, 2022
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.

None yet

2 participants