Extend return type parsing
- The issue was that QOAIObject lacked a constructor that accepts a
string, whereas all models derived from QOAIObject provided one.
This inconsistency caused the return type parsing to fail for QOAIObject.
- Add a constructor to the base object class that converts an
input string into a JSON object.
- Improve handling of operation response return types.
- Add a test to verify the implementation. The test passes if
the project compiles successfully.
The fix inspired by the following user's problem:
https://lists.qt-project.org/pipermail/interest/2026-July/040485.html
Pick-to: 6.11 6.12
Change-Id: I886af6d4ae8d7163770013cd20566541fe3fa9d2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| commit | ec70e0d5b96bb967252855befab87c080ea2cfa0 |
| parent | 1416728942d98274a4820c30004dc902709b1d2a |
| author | Tatiana Borisova <tatiana.borisova@qt.io> |
| committer | Tatiana Borisova <tatiana.borisova@qt.io> |
| commit time | Tue, 28 Jul 2026 18:01:42 +0000 |
- M src/tools/qtopenapi-generator/src/main/resources/cpp-qt6-client/api-body.mustache
- M src/tools/qtopenapi-generator/src/main/resources/cpp-qt6-client/common/object-body.mustache
- M src/tools/qtopenapi-generator/src/main/resources/cpp-qt6-client/common/object-header.mustache
- M tests/auto/qtopenapigen/client/openapigen/data/cmake_generated/commonlibtest/common/qoaiobject.cpp
- M tests/auto/qtopenapigen/client/openapigen/data/cmake_generated/commonlibtest/common/qoaiobject.h
- M tests/auto/responses/client/responses/responses.yaml