fix empty param not display url on postman
This commit is contained in:
parent
66ef399a89
commit
575176f5f8
|
@ -49,8 +49,9 @@ public class ApiRequestExample {
|
|||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
public ApiRequestExample setUrl(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<FormData> getFormDataList() {
|
||||
|
|
|
@ -154,7 +154,7 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate {
|
|||
private ApiRequestExample buildReqJson(JavaMethod method, ApiMethodDoc apiMethodDoc, Boolean isPostMethod, ProjectDocConfigBuilder configBuilder) {
|
||||
List<JavaParameter> parameterList = method.getParameters();
|
||||
if (parameterList.size() < 1) {
|
||||
return ApiRequestExample.builder().setJsonBody(apiMethodDoc.getUrl());
|
||||
return ApiRequestExample.builder().setUrl(apiMethodDoc.getUrl());
|
||||
}
|
||||
Map<String, String> pathParamsMap = new LinkedHashMap<>();
|
||||
Map<String, String> paramsComments = DocUtil.getParamsComments(method, DocTags.PARAM, null);
|
||||
|
|
Loading…
Reference in New Issue