File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
springdoc-openapi-common/src/main/java/org/springdoc/core Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 45
45
import org .apache .commons .lang3 .StringUtils ;
46
46
47
47
import org .springframework .core .MethodParameter ;
48
+ import org .springframework .core .ResolvableType ;
48
49
import org .springframework .core .annotation .AnnotationUtils ;
49
- import org .springframework .http .codec .multipart .FilePart ;
50
50
import org .springframework .web .multipart .MultipartFile ;
51
51
52
52
@ SuppressWarnings ("rawtypes" )
@@ -266,10 +266,8 @@ private Schema getFileSchema(RequestBodyInfo requestBodyInfo) {
266
266
267
267
private boolean isFile (ParameterizedType parameterizedType ) {
268
268
Type type = parameterizedType .getActualTypeArguments ()[0 ];
269
- if (MultipartFile .class .getName ().equals (type .getTypeName ())
270
- || FilePart .class .getName ().equals (type .getTypeName ())) {
269
+ if (isFile (ResolvableType .forType (type ).getRawClass ()))
271
270
return true ;
272
- }
273
271
else if (type instanceof WildcardType ) {
274
272
WildcardType wildcardType = (WildcardType ) type ;
275
273
Type [] upperBounds = wildcardType .getUpperBounds ();
You can’t perform that action at this time.
0 commit comments