OpenAPITools / OpenAPITools/openapi-generator
[BUG] Missing serverConf variable when emitting QT C++ clients
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
QT C++ Client code generator generates references to a serverConf variable, but it does not emit the definition of this variable.
/tmp/client/OAIExternalEngineApi.cpp: In member function ‘void OpenAPI::OAIExternalEngineApi::initializeServerConfigs()’:
/tmp/client/OAIExternalEngineApi.cpp:39:5: error: ‘serverConf’ was not declared in this scope; did you mean ‘_serverConfigs’?
39 | serverConf.append(OAIServerConfiguration(
| ^~~~~~~~~~
| _serverConfigs
openapi-generator version
This problem happens at HEAD.
OpenAPI declaration file content or url
It's the lichess.org official API. There's a download link right at the top.
Generation Details
Happens with the C++ QT Client API generator.
Steps to reproduce
To reproduce the original issue, install QT build dependencies, then:
- go to https://lichess.org/api, click the "Download" link, save
openapi.jsonsomewhere java -jar target/openapi-generator-cli.jar generate -i /path/to/openapi.json -o /tmp/Lichess -g cpp-qt-clientcd /tmp/Lichess/clientmkdir build && cd buildcmake ..make
Related issues/PRs
No existing ones.
Suggest a fix
Proposed fix: https://github.com/OpenAPITools/openapi-generator/pull/19859
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue identifies the cpp-qt-client generator and the generated client build as entry points. Start by running the listed OpenAPI Generator command with lichess openapi.json, then configure and build the generated client; done is a generated client that compiles without the missing-variable error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, openapi
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100