@@ -199,7 +199,7 @@ public static Optional<Content> getContent(io.swagger.v3.oas.annotations.media.C
199
199
*/
200
200
public static void mergeSchema (Content existingContent , Schema <?> schemaN , String mediaTypeStr ) {
201
201
if (existingContent .containsKey (mediaTypeStr )) {
202
- io . swagger . v3 . oas . models . media . MediaType mediaType = existingContent .get (mediaTypeStr );
202
+ MediaType mediaType = existingContent .get (mediaTypeStr );
203
203
if (!schemaN .equals (mediaType .getSchema ())) {
204
204
// Merge the two schemas for the same mediaType
205
205
Schema firstSchema = mediaType .getSchema ();
@@ -221,7 +221,7 @@ public static void mergeSchema(Content existingContent, Schema<?> schemaN, Strin
221
221
}
222
222
else
223
223
// Add the new schema for a different mediaType
224
- existingContent .addMediaType (mediaTypeStr , new io . swagger . v3 . oas . models . media . MediaType ().schema (schemaN ));
224
+ existingContent .addMediaType (mediaTypeStr , new MediaType ().schema (schemaN ));
225
225
}
226
226
227
227
/**
@@ -232,10 +232,15 @@ public static void mergeSchema(Content existingContent, Schema<?> schemaN, Strin
232
232
*/
233
233
@ SuppressWarnings ("unchecked" )
234
234
public static boolean isAnnotationToIgnore (MethodParameter parameter ) {
235
- return parameter .getParameterIndex () != -1
236
- && ANNOTATIONS_TO_IGNORE .stream ().anyMatch (
237
- annotation -> AnnotationUtils .findAnnotation (parameter .getParameter (), annotation ) != null
235
+ boolean annotationFirstCheck = ANNOTATIONS_TO_IGNORE .stream ().anyMatch (annotation ->
236
+ (parameter .getParameterIndex () != -1 && AnnotationUtils .findAnnotation (parameter .getParameter (), annotation ) != null )
238
237
|| AnnotationUtils .findAnnotation (parameter .getParameterType (), annotation ) != null );
238
+
239
+ boolean annotationSecondCheck = Arrays .stream (parameter .getParameterAnnotations ()).anyMatch (annotation ->
240
+ ANNOTATIONS_TO_IGNORE .contains (annotation .annotationType ())
241
+ || ANNOTATIONS_TO_IGNORE .stream ().anyMatch (annotationToIgnore -> annotation .annotationType ().getDeclaredAnnotation (annotationToIgnore ) != null ));
242
+
243
+ return annotationFirstCheck || annotationSecondCheck ;
239
244
}
240
245
241
246
/**
0 commit comments