Skip to content

Commit 239e4f9

Browse files
author
bnasslahsen
committed
2 parents 8db2531 + ce49d6f commit 239e4f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,7 @@ private Parameter buildParams(ParameterInfo parameterInfo, Components components
279279

280280
}
281281
else if (requestParam != null && !parameterBuilder.isFile(parameterInfo.getParameter())) {
282-
boolean isOptional = Optional.class.equals(methodParameter.getParameterType());
283-
requestInfo = new RequestInfo(ParameterIn.QUERY.toString(), requestParam.value(), requestParam.required() && !isOptional,
282+
requestInfo = new RequestInfo(ParameterIn.QUERY.toString(), requestParam.value(), requestParam.required() && !methodParameter.isOptional(),
284283
requestParam.defaultValue());
285284
parameter = buildParam(parameterInfo, components, requestInfo, jsonView);
286285
}

0 commit comments

Comments
 (0)