OpenAPITools / OpenAPITools/openapi-generator
[BUG] generator java/spring-mvc doesnt handle allOf well
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
Description
Generated class doesnt conist of all specified statements, e.g.:
request:
allOf:
- $ref: '#/components/schemas/first'
- $ref: '#/components/schemas/second'
-> resulting class only contains the first reference !
openapi-generator version
3.3.4
(4.0.0beta3 doesnt even produce correct classes that compile, because of a different problem with OneOf)
OpenAPI declaration file content or url
Command line used for generation
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 with the Java/Spring MVC generator and a minimal OpenAPI schema whose request uses allOf with references to first and second. Reproduce generation on version 3.3.4, compare the generated class with both referenced schemas, and verify that allOf output is complete; also check the reported OneOf compilation problem in 4.0.0beta3 separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100