typescript-fetch: fix isCollectionFormatMulti for arrays of files (#8376)

This commit is contained in:
Miroslav Šedivý 2021-01-08 08:46:25 +01:00 committed by GitHub
parent 2ba0e03629
commit f2671fcb78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,6 +219,14 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
return objs; return objs;
} }
@Override
public void postProcessParameter(CodegenParameter parameter) {
super.postProcessParameter(parameter);
if (parameter.isFormParam && parameter.isArray && "binary".equals(parameter.dataFormat)) {
parameter.isCollectionFormatMulti = true;
}
}
@Override @Override
public Map<String, Object> postProcessAllModels(Map<String, Object> objs) { public Map<String, Object> postProcessAllModels(Map<String, Object> objs) {
Map<String, Object> result = super.postProcessAllModels(objs); Map<String, Object> result = super.postProcessAllModels(objs);