Skip to content

Commit 1603bea

Browse files
author
bnasslahsen
committed
Spring 4 incompatibility using springdoc-openapi 1.2.30+. Fixes #563.
1 parent 73b1b83 commit 1603bea

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
import org.apache.commons.lang3.StringUtils;
4646

4747
import org.springframework.core.MethodParameter;
48+
import org.springframework.core.ResolvableType;
4849
import org.springframework.core.annotation.AnnotationUtils;
49-
import org.springframework.http.codec.multipart.FilePart;
5050
import org.springframework.web.multipart.MultipartFile;
5151

5252
@SuppressWarnings("rawtypes")
@@ -266,10 +266,8 @@ private Schema getFileSchema(RequestBodyInfo requestBodyInfo) {
266266

267267
private boolean isFile(ParameterizedType parameterizedType) {
268268
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()))
271270
return true;
272-
}
273271
else if (type instanceof WildcardType) {
274272
WildcardType wildcardType = (WildcardType) type;
275273
Type[] upperBounds = wildcardType.getUpperBounds();

0 commit comments

Comments
 (0)