修复issue #I191EO 表单数组显示问题
This commit is contained in:
parent
db5c5c4a37
commit
723f7f87c0
|
@ -435,7 +435,8 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate {
|
|||
}
|
||||
if (JavaClassValidateUtil.isPrimitive(gicName)) {
|
||||
ApiParam param = ApiParam.of().setField(paramName)
|
||||
.setType(DocClassUtil.processTypeNameForParams(simpleName));
|
||||
.setType(DocClassUtil.processTypeNameForParams(simpleName))
|
||||
.setDesc(comment).setRequired(required).setVersion(DocGlobalConstants.DEFAULT_VERSION);
|
||||
paramList.add(param);
|
||||
} else {
|
||||
if (requestBodyCounter > 0) {
|
||||
|
|
|
@ -412,11 +412,16 @@ public class DocUtil {
|
|||
}
|
||||
|
||||
public static Map<String, String> formDataToMap(List<FormData> formDataList) {
|
||||
Map<String, String> formDataMap = new LinkedHashMap<>();
|
||||
Map<String, String> formDataMap = new IdentityHashMap<>();
|
||||
for (FormData formData : formDataList) {
|
||||
if ("file".equals(formData.getType())) {
|
||||
continue;
|
||||
}
|
||||
if(formData.getKey().contains("[]")){
|
||||
String key = formData.getKey().substring(0,formData.getKey().indexOf("["));
|
||||
formDataMap.put(key,formData.getValue()+"&"+key+"="+formData.getValue());
|
||||
continue;
|
||||
}
|
||||
formDataMap.put(formData.getKey(), formData.getValue());
|
||||
}
|
||||
return formDataMap;
|
||||
|
|
Loading…
Reference in New Issue