Skip to content

Commit 6868f05

Browse files
authored
Merge pull request #1684 from dino-proj/patch-1
bug: incorrect generic param for multi interfaces
2 parents 5bd85e1 + 040df71 commit 6868f05

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/ReturnTypeParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static void findTypeForGenerics(Class<?>[] generics, Type[] typeArguments, Resol
151151
*/
152152
static ResolvableType resolveVariable(TypeVariable<?> typeVariable, ResolvableType contextType) {
153153
ResolvableType resolvedType;
154-
if (contextType.hasGenerics()) {
154+
if (contextType.hasGenerics() && contextType.getRawClass().equals(typeVariable.getGenericDeclaration())){
155155
resolvedType = ResolvableType.forType(typeVariable, contextType);
156156
if (resolvedType.resolve() != null) {
157157
return resolvedType;

0 commit comments

Comments
 (0)