I have rest services in springboot and using springdoc-openapi, and all my endpoints response with the same Class, like this:
public class ListResponse {
private List<?> list;
private Integer statusHttp;}
and in the field "list" I add a differents List of beans, the problem is when I generate the yaml definition with springdocs it only generate the follow schema for all the endpoints:
ListResponse:
type: object
properties:
lista:
type: array
items:
type: object
statusHttp:
type: integer
format: int32
any one knows how to generate custom schemas for the endpoints using my class ListResponse or should i generate a class for each endpoint with diferent field "list"?