Is it possible to have multiple IReturn<>
on a request DTO?
For example following route:
[Route("/api/whatever", "GET,POST,PUT,DELETE")]
public class WhateverRequest : IReturn<bool>, IReturn<List<Whatever>>
{
public string WhateverId { get; set; }
}
Depending on the request method I want to have another IReturn
.
Post-Put-Delete Request should only return a acknowledge if the request was successful:
IReturn<bool>
but on a GET request I want to have a:
IReturn<List<Whatever>>
It would also be good if there is a way to reflect this in Swagger Api/ Metadata Page.
Currently only the first IReturn
is shown.
Is this possible or would it be better to create a route for each different IReturn
?