OpenAPITools / OpenAPITools/openapi-generator
[REQ][Bounty] AnyOf - OneOf - AllOf support
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
Nowadays many popular OpenAPI specifications describe objects using oneOf / anyOf / allOf keywords. Regardless if this was a good or a bad idea, the OpenAPI generator should support this to avoid having to resort to manual fixes in build chains.
Describe the solution you'd like
Full support for these keywords in all generators.
Describe alternatives you've considered
Right now the only feasible workaround is to manually remove all of the methods that use these schema combine keywords or to implement them by hand in the generated code. This is obviously not ideal.
Additional context
This has been reported in many occassions before: #10450, #10352, #9858 , #9684, #9443, #2906, #5381, #8647, #8860, #9601, #9981, #9305, #9301, #9163, #8860, and many more.
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 reviewing how OpenAPI Generator currently handles the oneOf, anyOf, and allOf schema keywords across its generators. Identify the affected generators and existing coverage, then define tests that demonstrate support; done means the keywords work without manual fixes across the requested generators.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100