add json format

This commit is contained in:
oppofind 2020-01-04 23:25:57 +08:00
parent 9277bf3add
commit df106b1912
1 changed files with 2 additions and 2 deletions

View File

@ -220,11 +220,11 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate {
.append("\":")
.append(DocUtil.handleJsonStr(mockValue))
.append("}");
requestExample.setJsonBody(builder.toString()).setJson(true);
requestExample.setJsonBody(JsonFormatUtil.formatJson(builder.toString())).setJson(true);
paramAdded = true;
} else {
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;
}
} else if (SpringMvcAnnotations.PATH_VARIABLE.contains(annotationName)) {