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

Lack of support to change value of 'collectionFormat' for an endpoint parameter #1180

Closed
ipeluffo opened this issue Jun 18, 2015 · 8 comments
Labels
Milestone

Comments

@ipeluffo
Copy link

Hi everyone,

I've been searching for a way to change the value of the collectionFormat property of a parameter (ideally using the @ApiParam annotation) I found that it's not possible now.

Also, I asked in Google Groups for this to get a confirmation for my findings:
https://groups.google.com/forum/#!topic/swagger-swaggersocket/BqvTNRPRp-U

It would be nice to be able to configure this value for each multi-valued parameter.

Thanks in advance.
Ignacio

@webron
Copy link
Contributor

webron commented Jun 18, 2015

@ipeluffo, thanks for opening the issue. I preferred going into the discussion here rather than in the group as to not lose information. This is something we can definitely implement, but I'm curious to know your use case.

When we wrote the spec, we tried covering common uses within common libraries. JAX-RS specifically use multi by default for multiple values. Are you looking to set it to any other kind? Do you parse it internally as part of your app?

@ipeluffo
Copy link
Author

@webron , actually I found this issue because the default value is csv as reported in the issue #1160 .
In my case, I need to configure the collectionFormat property as multi, so fixing the issue #1160 should be enough for me.

However, I believe that adding the this feature is a more general solution that any developer can modify according to their particular implementation, like it was mention in #478 .

Anyway, feel free to close this issue if you think it'll be resolved fixing #1160

Thanks again.

@webron
Copy link
Contributor

webron commented Jun 18, 2015

@ipeluffo - okay, if #1160 is indeed the issue (and we will change it), then let's keep this one open as a general feature request, we may just not prioritize it high for now.

@webron webron added the Feature label Jul 13, 2015
@webron webron added this to the Future milestone Jul 13, 2015
@nikhilw
Copy link

nikhilw commented Sep 18, 2015

Would like to suggest that the same functionality should also be available in @ApiImplicitParam.

@fehguy
Copy link
Contributor

fehguy commented Dec 25, 2016

Added to the annotations in 1.5.11.

@vsvetoslavov
Copy link

"Added to the annotations in 1.5.11."
I am using swagger-core 2.0.0 and I see nothing like this there. Where has this been added?

@webron
Copy link
Contributor

webron commented Sep 22, 2018

There's no collectionFormat in swagger-core 2.x.

@vsvetoslavov
Copy link

@webron Thanks

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

No branches or pull requests

5 participants