-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature request : describe a field with multiple types #1363
Comments
Since swag follows swagger OpenAPI 2.0, while An alternative proposal is:
then, tell the given types in the field comment and output |
it doens't work. |
now that the v2 branch seems to have initial support for open API v3, any chance to add it? Just updated to v2.0.0 and trying this with
swag init --v3.1 produced a swagger file with no type for those
|
The oneof feature is not yet implemented on the V2 branch. But if you want to add new features there, feel free to do so :) |
Hello,
Is your feature request related to a problem? Please describe.
I would like to describe a field with type
any
that can be filled with a list of types (like a C/C++union
). Example :Describe the solution you'd like
I don't know if it is possible (in the spec), but I would like to tell swag to add these types in the generated data, and see that the
Root.Field
can be any of the given types.Describe alternatives you've considered
I have not considered alternatives yet. At leat a way to include types not directly referenced.
Additional context
N/A.
The text was updated successfully, but these errors were encountered: