-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[Go] Heterogeneous array with oneOf #500
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
A couple questions:
I'm tracking a number of specs here: https://github.com/grokify/api-specs So far, only one uses |
Unfortunately, the API and spec are private. Both. |
I see this is for a response in your example. Do you also use |
Yes, sorry I meant "both" to answer your second question. |
Thanks for the clarification. I've added a |
Description
Structs are not properly generated to handle arrays with item schema using
oneOf
. For instance, for theswagger.yml
in the next section, an empty struct is generated:This is what should be generated:
See the following Go playground: https://play.golang.org/p/rdNNL6nUUl1
openapi-generator version
Docker container version
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
#15
Suggest a fix/enhancement
The Go codegen should support arrays with
oneOf
schemata by integrating both/all types as list properties of the generatedstruct
as in the above example.The text was updated successfully, but these errors were encountered: