Hi,
I was wondering how I would go about to decorate my ResponseDTO from an AutoQuery service with Swagger metadata. For now I have the following AutoQuery request DTO:
public class FindBookings : QueryBase<BookedEvent, BookedEventResponse>, IJoin<BookedEvent, Resource>
This is decorated just fine, but the response dto called BookedEventResponse will not show a model in the Swagger UI.
[Description("My event is here")]
public class BookedEventResponse
{
[Description("response dto from")]
public DateTime From { get; set; }
}
In Swagger, the model is described as
QueryResponse {}
But I expected something like
QueryResponse<BookedEventResponse> {
DateTime From
}
or
BookedEventResponse {
DateTime From
}
I´ve also tried to add descriptions dynamically to the base class but they don’t show either:
typeof(QueryResponse<>)
.GetProperty("Offset")
.AddAttributes(new DescriptionAttribute(
"Describe me"
));
Is this a bug, not implemented or me not understanding?
Thank you