default collection format to csv according to the spec (#201)

This commit is contained in:
William Cheng 2018-04-23 16:14:45 +08:00 committed by Jérémie Bresson
parent db02cc2ac9
commit 16589de975

View File

@ -2595,7 +2595,8 @@ public class DefaultCodegen implements CodegenConfig {
codegenParameter.items = codegenProperty.items;
}
codegenParameter.collectionFormat = collectionFormat;
// default to csv
codegenParameter.collectionFormat = StringUtils.isEmpty(collectionFormat) ? "csv" : collectionFormat;
if ("multi".equals(collectionFormat)) {
codegenParameter.isCollectionFormatMulti = true;
}