-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REQ][Bounty] AnyOf - OneOf - AllOf support #10514
Comments
I'm creating this in order to gain traction to get sponsorship for this work. |
Given that currently different return objects for status code is non existent this is the other alternative. |
Sorry - which alternative? |
Yep this is very frustrating, the community has been asking this for a long time... |
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. :D |
+1 for this feature Encountered this today when trying to generate TypeScript client code via The generated code includes this unnecessary broken import which fails compilation of the client library:
|
oneOf works in my case. But anyOf simply takes the last model's attributes instead of composing all of them. |
I have an MR to fix anyOf generation for typesciprt-axios generator: #14241 |
Is there an update on when the feature can be supported? Since the requested feature has been on the short-term roadmap for over 2 years, I have the feeling that it has been abandoned. We use the typescript-angular generator in our projects and have to decide whether to replace it with another generator that supports |
Any update? |
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.
The text was updated successfully, but these errors were encountered: