-
Notifications
You must be signed in to change notification settings - Fork 668
Open
Description
I have a Request class as follows:
public class GetCareTypesRequest
{
/// <summary>Tpa Partition</summary>
[Required]
public string TpaPartition { get; set; }
}
I am passing entire object as a single query parameter instead of individual in Controller method as follows:
public async Task<IHttpActionResult> Get([FromUri] GetCareTypesRequest request) {}
When I go to Swagger page, I am seeing "request" as a prefix for TpaPartition parameter:

Even Request URI is coming as: http://localhost:52354/api/CareTypes?request.tpaPartition=0000010000010001
I am expecting it to be like: http://localhost:52354/api/CareTypes?tpaPartition=0000010000010001 and I still want to send entire object as a single query parameter.
What should I do to achieve this? I came across few articles which suggest to create a custom Filter but any easy way would be very helpful.
Metadata
Metadata
Assignees
Labels
No labels