Skip to content
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

Parameters of type [array] not showing expected behavior. #363

Closed
Schandlich opened this issue May 28, 2015 · 3 comments
Closed

Parameters of type [array] not showing expected behavior. #363

Schandlich opened this issue May 28, 2015 · 3 comments
Milestone

Comments

@Schandlich
Copy link

If I were to have a controller method like so:

public async Task<IHttpActionResult> Get([FromUri]string[] tags, [FromUri]int? skip = 0, [FromUri]int? top = 1000)

I would expect to have swagger ui render it like it is in the "pets" demo. http://petstore.swagger.io/#!/pet/findPetsByTags
untitled

Instead, what I get is:
untitled2

It appears that the json getting generated is the same:

Mine:

{
   "name":"tags",
   "in":"query",
   "required":true,
   "type":"array",
   "items":{
      "type":"string"
   },
   "collectionFormat":"multi"
}

Demo:

{
   "name":"tags",
   "in":"query",
   "description":"Tags to filter by",
   "required":true,
   "type":"array",
   "items":{
      "type":"string"
   },
   "collectionFormat":"multi"
}

Does anyone have any suggestions?

@domaindrivendev
Copy link
Owner

This is due to SB bundling a slightly older version of swagger-ui. Will be updated with the next release

@domaindrivendev
Copy link
Owner

Should be resolved in latest release - 5.2.0

@Schandlich
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants