-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
How can I represent java Generic type in swagger.yml #957
Comments
There's no support for templating of responses (or message wrappers). |
You mean that no definition can generate Java generic type like |
How it translates to code in a specific language is out of scope. You can use composition and inheritance, but not templating. |
Maybe this thread can be useful? Take a look at the last message |
Generics/templates are supported in OAS 3.1 by using dynamic references. |
Hi, I have multiple APIs returning data with same structure, just like examples underneath:
How can I represent them in swagger so that I can generate
EntityResponse<T>
, when I refer to them, I just replace T with Cat or Dog.So that I just need to define one response object.
Thx.
The text was updated successfully, but these errors were encountered: