Skip to content

Commit 50319e2

Browse files
committed
modify ResponseSupportConverter to resolve inner type
1 parent c065481 commit 50319e2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

springdoc-openapi-common/src/main/java/org/springdoc/core/converters/ResponseSupportConverter.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,15 @@ public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterato
4949
JavaType innerType = javaType.getBindings().getBoundType(0);
5050
if (innerType == null)
5151
return new StringSchema();
52-
else if (innerType.getBindings() != null && isResponseTypeWrapper(innerType.getRawClass())) {
53-
type = new AnnotatedType(innerType).jsonViewAnnotation(type.getJsonViewAnnotation()).ctxAnnotations(type.getCtxAnnotations()).resolveAsRef(true);
54-
return this.resolve(type, context, chain);
55-
}
56-
else
57-
type = new AnnotatedType(innerType).jsonViewAnnotation(type.getJsonViewAnnotation()).ctxAnnotations((type.getCtxAnnotations())).resolveAsRef(true);
52+
return context.resolve(new AnnotatedType(innerType)
53+
.jsonViewAnnotation(type.getJsonViewAnnotation())
54+
.ctxAnnotations((type.getCtxAnnotations()))
55+
.resolveAsRef(true));
5856
}
5957
else if (isResponseTypeToIgnore(cls))
6058
return null;
6159
}
6260
return (chain.hasNext()) ? chain.next().resolve(type, context, chain) : null;
6361
}
6462

65-
}
63+
}

0 commit comments

Comments
 (0)