Skip to content

Commit f144af0

Browse files
author
bnasslahsen
committed
project review
1 parent 239e4f9 commit f144af0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,7 @@ private Type getReturnType(MethodParameter methodParameter) {
260260
}
261261

262262
public Schema calculateSchema(Components components, Type returnType, JsonView jsonView) {
263-
if (isVoid(returnType)) {
264-
// if void, no content
265-
return null;
266-
}
267-
return SpringDocAnnotationsUtils.extractSchema(components, returnType, jsonView);
263+
return !isVoid(returnType) ? SpringDocAnnotationsUtils.extractSchema(components, returnType, jsonView) : null;
268264
}
269265

270266
private void setContent(String[] methodProduces, Content content,

0 commit comments

Comments
 (0)