Skip to content

[cpp-qt][client] add support for primitives types body#12301

Merged
wing328 merged 3 commits intoOpenAPITools:masterfrom
Thaulino:qt-cpp-client-primitives-types-body
May 15, 2022
Merged

[cpp-qt][client] add support for primitives types body#12301
wing328 merged 3 commits intoOpenAPITools:masterfrom
Thaulino:qt-cpp-client-primitives-types-body

Conversation

@Thaulino
Copy link
Copy Markdown
Contributor

@Thaulino Thaulino commented May 6, 2022

Details of change

Added the proper handling for primitves in request bodies
Related issue: closes #11984

Added primitives to src/tests of cpp-qt

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 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    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*.
    For Windows users, please run the script in Git BASH.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Technical committee

@muttleyxd
@etherealjoy
@wing328

@wing328
Copy link
Copy Markdown
Member

wing328 commented May 15, 2022

Tested locally and the result is good:

PASS   : UserApiTests::initTestCase()
QDEBUG : UserApiTests::createUserTest() got a request body
PASS   : UserApiTests::createUserTest()
QDEBUG : UserApiTests::createUsersWithArrayInputTest() got a request body
PASS   : UserApiTests::createUsersWithArrayInputTest()
QDEBUG : UserApiTests::createUsersWithListInputTest() got a request body
PASS   : UserApiTests::createUsersWithListInputTest()
QDEBUG : UserApiTests::deleteUserTest() Error happened while issuing request :  "Error transferring http://petstore.swagger.io/v2/user/rambo - server replied: Not Found, "
PASS   : UserApiTests::deleteUserTest()
QDEBUG : UserApiTests::getUserByNameTest() "johndoe"
PASS   : UserApiTests::getUserByNameTest()
QDEBUG : UserApiTests::loginUserTest() "{\"code\":200,\"type\":\"unknown\",\"message\":\"logged in user session:1652608027710\"}"
PASS   : UserApiTests::loginUserTest()
PASS   : UserApiTests::logoutUserTest()
QDEBUG : UserApiTests::updateUserTest() got a request body
PASS   : UserApiTests::updateUserTest()
PASS   : UserApiTests::cleanupTestCase()
Totals: 10 passed, 0 failed, 0 skipped, 0 blacklisted, 84ms
********* Finished testing of UserApiTests *********
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:00 min
[INFO] Finished at: 2022-05-15T17:47:07+08:00
[INFO] ------------------------------------------------------------------------

@wing328 wing328 merged commit 559a261 into OpenAPITools:master May 15, 2022
@wing328
Copy link
Copy Markdown
Member

wing328 commented May 15, 2022

@Thaulino thanks for the PR, which has been merged into the master.

@wing328 wing328 added this to the 6.0.0 milestone May 15, 2022
@wing328 wing328 changed the title Qt cpp client primitives types body [cpp-qt][client] add support for primitives types body May 22, 2022
@rejuce
Copy link
Copy Markdown

rejuce commented Jun 30, 2022

the issue still persist for bool type
const ::OpenAPI::OptionalParam &body

the same fix can be applied

QByteArray output = QByteArray::number(body.value());

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.

[BUG][cpp-qt-client] compile error code for primitive types in body of put requests

3 participants