[REQ][Bounty] AnyOf - OneOf - AllOf support
See original GitHub issueIs 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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:61
- Comments:9
Top Results From Across the Web
oneOf, anyOf, allOf, not - Swagger
OAS 3 This guide is for OpenAPI 3.0. oneOf, anyOf, allOf, not. OpenAPI 3.0 provides several keywords which you can use to combine...
Read more >Support for oneOf, anyOf and allOf - Liferay Help Center
Support for oneOf, anyOf and allOf. OpenAPI 3.0 added several ways of using inheritance and composition to create complex schemas. Specifically, it added ......
Read more >oneOf / anyOf / allOf - react-jsonschema-form documentation
react-jsonschema-form supports custom widgets for oneOf, anyOf, and allOf. A schema with oneOf is valid if exactly one of the subschemas is valid....
Read more >IT18365: ADD ALLOF, ANYOF AND ONEOF PROPERTY ...
The Mapping node is enhanced to support use of JSON schema files and REST API Swagger documents including the JSON schema allOf, anyOf...
Read more >Understanding JSON Schema 2020-12 documentation
allOf ; anyOf; oneOf; not; Properties of Schema Composition ... these facilities help to enable that and are described in Structuring a complex...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is indeed very frustrating. But at least it’s on the “short-term roadmap” of OpenAPI generator :
I hope they provide support for it real soon 😃
I’ve opened #10812 and now realize it’s really just a python-specific subset of this. That ticket has a $1,000 bounty for now, in case someone’s monitoring this issue and needs a little motivation. 😄