add json format
This commit is contained in:
parent
9277bf3add
commit
df106b1912
|
@ -220,11 +220,11 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate {
|
||||||
.append("\":")
|
.append("\":")
|
||||||
.append(DocUtil.handleJsonStr(mockValue))
|
.append(DocUtil.handleJsonStr(mockValue))
|
||||||
.append("}");
|
.append("}");
|
||||||
requestExample.setJsonBody(builder.toString()).setJson(true);
|
requestExample.setJsonBody(JsonFormatUtil.formatJson(builder.toString())).setJson(true);
|
||||||
paramAdded = true;
|
paramAdded = true;
|
||||||
} else {
|
} else {
|
||||||
String json = JsonBuildHelper.buildJson(typeName, gicTypeName, Boolean.FALSE, 0, new HashMap<>(), configBuilder);
|
String json = JsonBuildHelper.buildJson(typeName, gicTypeName, Boolean.FALSE, 0, new HashMap<>(), configBuilder);
|
||||||
requestExample.setJsonBody(json).setJson(true);
|
requestExample.setJsonBody(JsonFormatUtil.formatJson(json)).setJson(true);
|
||||||
paramAdded = true;
|
paramAdded = true;
|
||||||
}
|
}
|
||||||
} else if (SpringMvcAnnotations.PATH_VARIABLE.contains(annotationName)) {
|
} else if (SpringMvcAnnotations.PATH_VARIABLE.contains(annotationName)) {
|
||||||
|
|
Loading…
Reference in New Issue