Skip to content

Commit e3e1036

Browse files
author
bnasslahsen
committed
NPE within AbstractRequestService
. Fixes #962.
1 parent 7e50c6f commit e3e1036

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ private Parameter buildParam(ParameterInfo parameterInfo, Components components,
462462
if (parameter.getSchema() == null && parameter.getContent() == null) {
463463
Schema<?> schema = parameterBuilder.calculateSchema(components, parameterInfo, null,
464464
jsonView);
465-
if (parameterInfo.getDefaultValue() != null)
465+
if (parameterInfo.getDefaultValue() != null && schema !=null)
466466
schema.setDefault(parameterInfo.getDefaultValue());
467467
parameter.setSchema(schema);
468468
}

0 commit comments

Comments
 (0)