-
Notifications
You must be signed in to change notification settings - Fork 451
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
@ApiParam collectionFormat parameter not working #425
Comments
I'm using version 1.5.11. I implicitly pointed "csv":
But in swagger document I can see "multi", I'm wondering why is it happening? |
Same issue when I used @ApiImplicitParam (1.5.16 and 1.5.18). The generated swagger always used "multi" |
I'm having the same issue with version 1.5.20. Probably removing this line would allow us to use csv as collectionFormat in query params, but I haven't tried rebuilding the jar (yet): public void setType(String type) {
this.type = type;
if(ArrayProperty.isType(type)) {
if(getCollectionFormat() == null){
setCollectionFormat(getDefaultCollectionFormat());
}
} else {
setCollectionFormat(null);
}
} |
Seems like when you trying to generate swagger.json with swagger-maven-plugin from annotations, swagger-maven-plugin skip
@ApiParam(collectionFormat = "csv")
and set"collectionFormat" : "multi"
by default.Is there a way to make swagger-maven-plugin to read
collectionFormat
parameter from@ApiParam
annotation?collectionFormat
added in swagger annotations version 1.5.11 swagger-api/swagger-core#1180Also seem like it is something wrong here https://github.com/kongchen/swagger-maven-plugin/blob/master/src/main/java/com/github/kongchen/swagger/docgen/reader/AbstractReader.java#L441
csv
is changed tomulti
. Do not sure it is really a problem, but maybe this link helps.The text was updated successfully, but these errors were encountered: