Skip to content

Commit c9b5836

Browse files
author
bnasslahsen
committed
code refactoring
1 parent 30bf1b0 commit c9b5836

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,11 @@ private Type getReturnType(Method method) {
251251
}
252252

253253
private Schema<?> calculateSchema(Components components, Type returnType, JsonView jsonView) {
254-
Schema<?> schemaN = null;
255254
if (isVoid(returnType)) {
256255
// if void, no content
257256
return null;
258257
}
259-
if (schemaN == null) {
260-
schemaN = SpringDocAnnotationsUtils.extractSchema(components, returnType, jsonView);
261-
}
258+
Schema<?> schemaN = SpringDocAnnotationsUtils.extractSchema(components, returnType, jsonView);
262259
if (schemaN == null && returnType instanceof Class) {
263260
schemaN = AnnotationsUtils.resolveSchemaFromType((Class) returnType, null, jsonView);
264261
}

0 commit comments

Comments
 (0)