I'm using Swagger with serializing for OpenApi 3.0. In detail I try to serialize an input query parameter array with the following format
?myArray=1,2,3,4
I know how to achieve this in the swagger documentation. Just set parameter.explode=false
parameters:
- name: myArray
in: query
explode: false
...
But I don't know how to set this parameter property in ASP.Net Core 3.1 in my controller class to get my swagger doc generated correctly. I tried several things like implementing a filter based on IParameterFilter but nothing worked fine for me.
Fortunately I was able solve the issue as I found a discussion in Swashbuckle.AspNetCore on GitHub.
Implementing a custom parameter filter was the right way.
The filter has to be applied to the swagger gen in the ASP.Net core Startup.cs