-
-
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] Java Spring generic ApiResponse #16428
Comments
First of all, this question is more about the OpenAPI Specification itself. As of today, the current version is 3.1.0, which does not support dynamic links (at least this feature is not described). But in the OAS 3.1.1, which is still under development, the description is present. Well, we'll have to wait for the release of the OAS 3.1.1. |
So as I understand it, the generic data structures support is part of JSON Schema which the OAS 3.1 is built upon. The only difference in 3.1.1 is the spec explicitly calls out the use of using |
Regardless, the 3.1.1 spec looks like it is going to land in the near future 😃 |
now that 3.1.1 is released. is progress being made here |
Is your feature request related to a problem? Please describe.
I couldn't find a solution to define a generic response for open-api Spring generator or in general for the open-api generator.
Describe the solution you'd like
In my yaml file I want to define something like this:
and have specific endpoints return a specific implementation of the generic response like:
This should then create a Java class for the ApiResponse like:
and for the endpoints:
Describe alternatives you've considered
I thought of somehow using mustache templates and overriding specific schemas with the template but I don't know how that would work. Maybe there is already an easier build in solution?
Otherwise, please guide me to a useful documentation on how to use templates for this use-case.
Additional context
...
The text was updated successfully, but these errors were encountered: