diff --git a/src/main/java/com/ly/doc/template/IRestDocTemplate.java b/src/main/java/com/ly/doc/template/IRestDocTemplate.java index 881f0f4d..d4c4b0c5 100644 --- a/src/main/java/com/ly/doc/template/IRestDocTemplate.java +++ b/src/main/java/com/ly/doc/template/IRestDocTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 smart-doc + * Copyright (C) 2018-2025 smart-doc * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -1110,8 +1110,7 @@ else if (frameworkAnnotations.getRequestPartAnnotation() required = Boolean.parseBoolean(strRequired); } // not get and delete method and has MediaType - boolean bodyMediaType = !(Methods.GET.getValue().equals(docJavaMethod.getMethodType()) - || Methods.DELETE.getValue().equals(docJavaMethod.getMethodType())) + boolean bodyMediaType = !Methods.GET.getValue().equals(docJavaMethod.getMethodType()) && StringUtil.isNotEmpty(methodMediaType) && (MediaType.APPLICATION_FORM_URLENCODED_VALUE.equals(methodMediaType) || MediaType.APPLICATION_JSON_VALUE.equals(methodMediaType) diff --git a/src/main/java/com/ly/doc/template/SpringBootDocBuildTemplate.java b/src/main/java/com/ly/doc/template/SpringBootDocBuildTemplate.java index 04cdd1f2..4a8dbb9f 100644 --- a/src/main/java/com/ly/doc/template/SpringBootDocBuildTemplate.java +++ b/src/main/java/com/ly/doc/template/SpringBootDocBuildTemplate.java @@ -163,7 +163,7 @@ public FrameworkAnnotations registeredAnnotations() { annotations.setServerEndpointAnnotation(serverEndpointAnnotation); // add mapping annotations - Map mappingAnnotations = buildSpringMappingAnnotations(); + Map mappingAnnotations = this.buildSpringMappingAnnotations(); annotations.setMappingAnnotations(mappingAnnotations); // Exception advice annotations diff --git a/src/main/java/com/ly/doc/utils/ApiParamTreeUtil.java b/src/main/java/com/ly/doc/utils/ApiParamTreeUtil.java index 38b578ec..fe769cca 100644 --- a/src/main/java/com/ly/doc/utils/ApiParamTreeUtil.java +++ b/src/main/java/com/ly/doc/utils/ApiParamTreeUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 smart-doc + * Copyright (C) 2018-2025 smart-doc * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -129,8 +129,7 @@ public static ApiMethodReqParam buildMethodReqParam(List paramList, param.setId(pathParams.size() + 1); pathParams.add(param); } - else if (param.isQueryParam() || Methods.GET.getValue().equals(methodType) - || Methods.DELETE.getValue().equals(methodType)) { + else if (param.isQueryParam() || Methods.GET.getValue().equals(methodType)) { if (queryReqParamMap.containsKey(param.getField())) { param.setConfigParam(true).setValue(queryReqParamMap.get(param.getField()).getValue()); }