Skip to content

Commit ff8fc26

Browse files
authored
Merge branch 'master' into feat/issue-5027-required-set
2 parents 74b6c87 + ca8b4b5 commit ff8fc26

2 files changed

Lines changed: 486 additions & 4 deletions

File tree

modules/swagger-core/src/main/java/io/swagger/v3/core/util/AnnotationsUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ public static Optional<Schema> getSchemaFromAnnotation(
780780
schemaObject.setExamples(parseExamplesArray(schema));
781781
}
782782

783-
if (!DEFAULT_SENTINEL.equals(schema.defaultValue())){
783+
if (schema.defaultValue() != null && !DEFAULT_SENTINEL.equals(schema.defaultValue())) {
784784
setDefaultSchema(schema, openapi31, schemaObject);
785785
}
786786
if (StringUtils.isNotBlank(schema.example()) &&

0 commit comments

Comments
 (0)