-
-
Notifications
You must be signed in to change notification settings - Fork 227
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Support top level oneOf
and anyOf
#388
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
Comments
I guess on second thought here, it's unclear how we'd actually represent a model which is nothing other than a union of other models. Maybe the desired outcome of this ticket is simply to raise an error during code generation? |
For I'd love to know how folks are actually using |
oneOf
or anyOf
have empty propertiesoneOf
and anyOf
Openapi schemas can combine oneOf anyOf allOf and properties all in a single schema. |
What is the status for this issue? Because I am in a situation there I need it and would love to not create workarounds for it 😉 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Describe the bug
If a top-level schema is defined using
oneOf
oranyOf
, the generated model has no properties.To Reproduce
See this PR which adds a test case for the bug: #387
Expected behavior
It should work the same way as it does for model properties, i.e., constructing a union type.
OpenAPI Spec File
#387
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: