Skip to content

Commit e529a47

Browse files
author
bnasslahsen
committed
Improve isParamToIgnore
1 parent 657c37d commit e529a47

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

springdoc-openapi-common/src/main/java/org/springdoc/core/AbstractRequestBuilder.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,11 @@ protected Parameter customiseParameter(Parameter parameter, ParameterInfo parame
243243
}
244244

245245
protected boolean isParamToIgnore(MethodParameter parameter) {
246-
if (parameter.getParameterAnnotation(PathVariable.class) !=null || parameter.getParameterAnnotation(RequestParam.class) !=null) {
246+
if(parameterBuilder.isAnnotationToIgnore(parameter))
247+
return true;
248+
if (parameter.getParameterAnnotation(PathVariable.class) !=null || parameter.getParameterAnnotation(RequestParam.class) !=null)
247249
return false;
248-
}
249-
return parameterBuilder.isAnnotationToIgnore(parameter) || PARAM_TYPES_TO_IGNORE.contains(parameter.getParameterType());
250+
return PARAM_TYPES_TO_IGNORE.contains(parameter.getParameterType());
250251
}
251252

252253
private void setParams(Operation operation, List<Parameter> operationParameters, RequestBodyInfo requestBodyInfo) {

0 commit comments

Comments
 (0)