OpenAPITools / OpenAPITools/openapi-generator
[BUG] cpp-restsdk inheritance of classes is not written into .h file
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When having inheritance from another class cpp-restsdk generator does not generate the correct .h file for the derived class.
The declaration of the superclass is missing.
What is generated:
class ChildClass : public ModelBase { ... }
What I would expect:
class ChildClass : public ModelBase, public SuperClass { ... }
hint: #include for the SuperClass is generated as expected
openapi-generator version
openapi-generator-maven-plugin v6.6.0
OpenAPI declaration file content or url
Generation Details
generated with openapi-generator-maven-plugin
Steps to reproduce
Related issues/PRs
Suggest a fix
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
Start by reproducing the supplied SuperClass and ChildClass OpenAPI schemas with openapi-generator-maven-plugin v6.6.0 and inspect the generated cpp-restsdk header. Compare the derived class declaration with the expected inheritance list, while checking that the SuperClass include remains present. Done means the generated .h file declares both ModelBase and SuperClass as base classes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100