Skip to content

Commit ba9f3e0

Browse files
committed
fix compatibility with spring-boot 1 apps
1 parent aab7c34 commit ba9f3e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public static void mergeSchema(Content existingContent, Schema<?> schemaN, Strin
233233
@SuppressWarnings("unchecked")
234234
public static boolean isAnnotationToIgnore(MethodParameter parameter) {
235235
boolean annotationFirstCheck = ANNOTATIONS_TO_IGNORE.stream().anyMatch(annotation ->
236-
(parameter.getParameterIndex() != -1 && AnnotationUtils.findAnnotation(parameter.getParameter(), annotation) != null)
236+
(parameter.getParameterIndex() != -1 && AnnotationUtils.findAnnotation(parameter.getMethod().getParameters()[parameter.getParameterIndex()], annotation) != null)
237237
|| AnnotationUtils.findAnnotation(parameter.getParameterType(), annotation) != null);
238238

239239
boolean annotationSecondCheck = Arrays.stream(parameter.getParameterAnnotations()).anyMatch(annotation ->

0 commit comments

Comments
 (0)