Skip to content

Commit b005278

Browse files
committed
- open api: fix minor upgrade generating breaking changes
1 parent 2e50a19 commit b005278

File tree

1 file changed

+3
-1
lines changed
  • modules/jooby-openapi/src/main/java/io/jooby/internal/openapi/projection

1 file changed

+3
-1
lines changed

modules/jooby-openapi/src/main/java/io/jooby/internal/openapi/projection/SchemaPruner.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ private static void copyMetadata(Schema<?> source, Schema<?> target) {
120120
target.setTitle(source.getTitle());
121121
target.setDescription(source.getDescription());
122122
target.setFormat(source.getFormat());
123-
target.setDefault(source.getDefault());
123+
if (source.getDefaultSetFlag()) {
124+
target.setDefault(source.getDefault());
125+
}
124126
if (source.getExample() != null) {
125127
target.setExample(source.getExample());
126128
}

0 commit comments

Comments
 (0)