[CPP-QT-QHTTPENGINE] Code errors generating server with petstore
Created by: ipittau
Description
Server has some code errors that prevents build and to runtime good execution.
- Error on API Request handler lambda function for process, extra "m" is present
- Error on regular expression to capture ids on path
openapi-generator version
Generator version 5.3.1
OpenAPI declaration file content or url
Sample Petstore
Command line used for generation
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i /local/petstore.yaml -g cpp-qt-qhttpengine-server -o /local/out/qt
Steps to reproduce
Generate the server and try to build.
- A build error is present because of undeclared m parameter
- Runtime a simple get will not be capture from regular expression (GET /v2/user/MyUser)
Suggest a fix/enhancement
-
Fix on modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache line 39 [this, socket, m] -> [this, socket]
-
Fix on modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache line 94 QRegularExpression parExpr( R"({([^\/\\s]+)})" ); -> QRegularExpression parExpr( R"({([^\/\s]+)})" ); ->