Fix Postman FormData description
This commit is contained in:
parent
61d25f8e9a
commit
79c206a40d
|
@ -130,7 +130,7 @@ public class FormDataBuildHelper {
|
|||
FormData formData = new FormData();
|
||||
formData.setKey(pre + fieldName);
|
||||
formData.setType("file");
|
||||
formData.setDesc(comment);
|
||||
formData.setDescription(comment);
|
||||
formData.setValue("");
|
||||
formDataList.add(formData);
|
||||
} else if (JavaClassValidateUtil.isPrimitive(subTypeName)) {
|
||||
|
@ -144,7 +144,7 @@ public class FormDataBuildHelper {
|
|||
formData.setKey(pre + fieldName);
|
||||
formData.setType("text");
|
||||
formData.setValue(StringUtil.removeQuotes(fieldValue));
|
||||
formData.setDesc(comment);
|
||||
formData.setDescription(comment);
|
||||
formDataList.add(formData);
|
||||
} else if (javaClass.isEnum()) {
|
||||
Object value = JavaClassUtil.getEnumValue(javaClass, Boolean.TRUE);
|
||||
|
@ -152,7 +152,7 @@ public class FormDataBuildHelper {
|
|||
formData.setKey(pre + fieldName);
|
||||
formData.setType("text");
|
||||
formData.setValue(StringUtil.removeQuotes(String.valueOf(value)));
|
||||
formData.setDesc(comment);
|
||||
formData.setDescription(comment);
|
||||
formDataList.add(formData);
|
||||
} else if (JavaClassValidateUtil.isCollection(subTypeName)) {
|
||||
String gNameTemp = field.getType().getGenericCanonicalName();
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.power.doc.model;
|
|||
public class FormData {
|
||||
private String key;
|
||||
private String type;
|
||||
private String desc;
|
||||
private String description;
|
||||
private String src;
|
||||
private String value;
|
||||
|
||||
|
@ -64,12 +64,12 @@ public class FormData {
|
|||
this.value = value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -77,7 +77,7 @@ public class FormData {
|
|||
return "FormData{" +
|
||||
"key='" + key + '\'' +
|
||||
", type='" + type + '\'' +
|
||||
", desc='" + desc + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", src='" + src + '\'' +
|
||||
", value='" + value + '\'' +
|
||||
'}';
|
||||
|
|
|
@ -42,6 +42,6 @@ public class InfoBean {
|
|||
} else {
|
||||
this.name = name;
|
||||
}
|
||||
this.schema = "https://schema.getpostman.com/json/collection/v2.0.0/collection.json";
|
||||
this.schema = "https://schema.getpostman.com/json/collection/v2.1.0/collection.json";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -351,13 +351,13 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate<ApiDoc> {
|
|||
FormData formData = new FormData();
|
||||
formData.setKey(paramName);
|
||||
formData.setType("file");
|
||||
formData.setDesc(comment);
|
||||
formData.setDescription(comment);
|
||||
formData.setValue(mockValue);
|
||||
formDataList.add(formData);
|
||||
} else if (JavaClassValidateUtil.isPrimitive(typeName)) {
|
||||
FormData formData = new FormData();
|
||||
formData.setKey(paramName);
|
||||
formData.setDesc(comment);
|
||||
formData.setDescription(comment);
|
||||
formData.setType("text");
|
||||
formData.setValue(mockValue);
|
||||
formDataList.add(formData);
|
||||
|
@ -375,7 +375,7 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate<ApiDoc> {
|
|||
if (!paramName.contains("[]")) {
|
||||
formData.setKey(paramName + "[]");
|
||||
}
|
||||
formData.setDesc(comment);
|
||||
formData.setDescription(comment);
|
||||
formData.setType("text");
|
||||
formData.setValue(RandomUtil.randomValueByType(gicName));
|
||||
formDataList.add(formData);
|
||||
|
@ -386,7 +386,7 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate<ApiDoc> {
|
|||
FormData formData = new FormData();
|
||||
formData.setKey(paramName);
|
||||
formData.setType("text");
|
||||
formData.setDesc(comment);
|
||||
formData.setDescription(comment);
|
||||
formData.setValue(strVal);
|
||||
formDataList.add(formData);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue