I want to send a list of objects in the response of an API using Swagger.
@ApiResponse(code = 200, message = ApiResponseMessages.ITEM_FETCHED,
response = "")
I have a class -
class Item{
int id;
String item_name;
}
I want a response like -
{
{
"id" : 0,
"item_name" : ""
}
{
"id" : 0,
"item_name" : ""
}
{
"id" : 0,
"item_name" : ""
}
}
How can i do this. Any help would be appreciated.