Skip to content

Commit

Permalink
when allOf is one type don't create composite
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioArrighi committed Feb 5, 2024
1 parent 285907c commit 06140b1
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2686,14 +2686,17 @@ at the moment path passed as string (basePath) from upper components can be both
ComposedSchema composedSchema = new ComposedSchema();

if (allOfArray != null) {

for (JsonNode n : allOfArray) {
if (n.isObject()) {
schema = getSchema((ObjectNode) n, location, result);
composedSchema.addAllOfItem(schema);
if (allOfArray.size() > 1) {
for (JsonNode n : allOfArray) {
if (n.isObject()) {
schema = getSchema((ObjectNode) n, location, result);
composedSchema.addAllOfItem(schema);
}
}
schema = composedSchema;
} else if (allOfArray.size() == 1) {
schema = getSchema((ObjectNode) allOfArray.get(0), location, result);
}
schema = composedSchema;
}
if (anyOfArray != null) {

Expand Down

0 comments on commit 06140b1

Please sign in to comment.