Home > front end >  String array in query parameters swagger
String array in query parameters swagger

Time:02-11

I'm working on a project where there is an endpoint that receives a list of strings in the parameter, as shown in the code below:

public class PaymentFilter
{
    public List<string> Status  {get; set; }
}

[HttpGet]
public IActionResult Get([FromQuery] PaymentFilter filter)
{
    ...
}

However, in the swagger interface the status list is not reflected, as shown in the image:

enter image description here

How do I enable entries for the status list?

CodePudding user response:

Click Try it out button and click Add string item then you can add parameter

enter image description here

  • Related