Skip to content

Commit 3695edd

Browse files
committed
keep allOf, anyOf, oneOf alongside properties while flattening
1 parent 285907c commit 3695edd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/InlineModelResolver.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,11 @@ public Schema createModelFromProperty(Schema schema, String path) {
680680
flattenProperties(properties, path);
681681
model.setProperties(properties);
682682
}
683+
if (schema instanceof ComposedSchema){
684+
model.setAllOf(((ComposedSchema) schema).getAllOf());
685+
model.setAnyOf(((ComposedSchema) schema).getAnyOf());
686+
model.setOneOf(((ComposedSchema) schema).getOneOf());
687+
}
683688

684689
return model;
685690
}

0 commit comments

Comments
 (0)