question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[REQ][Bounty] AnyOf - OneOf - AllOf support

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:61
  • Comments:9

github_iconTop GitHub Comments

8reactions
Mehlycommented, Nov 8, 2021

This is indeed very frustrating. But at least it’s on the “short-term roadmap” of OpenAPI generator :

Short term are focused on improving contributor and user productivity (part of this is getting the word out).

  • […]
  • OAS3.0 features support: anyOf, oneOf, callbacks, etc"

I hope they provide support for it real soon 😃

1reaction
mariodsantanacommented, Dec 24, 2021

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. 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found