-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to setup example for a query parameter of type List<string> #152
Comments
Hi Sturla Thanks for opening this issue in the correct repo. I'm sorry that I didn't spot it sooner when you first opened your issue, as you may have noticed I was looking at it on my phone. |
I recently added support for querystring examples to Swashbuckle.AspNetCore in this PR domaindrivendev/Swashbuckle.AspNetCore#1629. I didn't explicitly add support for lists to that, so if you want Lists to work then you'd need to add it to Swashbuckle.AspNetCore yourself (and submit a PR). |
Ok @mattfrear I have nothing better to do over the weekend so how would we represent the example of List ? Something like this here? /// <summary>
/// GetById
/// </summary>
// <param name="Ids" example="first|second|third"></param>
public void GetByIds([FromQuery] List<string> ids)
{} I'll post a comment on Swashbuckle.AspNetCore and ask for a design and reference this one |
I started with an issue at Swashbuckle.Examples that evolved into using this filter so I'm recreating it here in the correct place.
So my issue is basically that I can't show an example values for a List in Swagger UI. My last attempt was to use the List Request example like this here below but that doesn't change anything in the UI.
What am I doing wrong here? Must be something tiny I'm missing...
The text was updated successfully, but these errors were encountered: