@@ -458,33 +458,31 @@ public Schema normalizeSchema(Schema schema, Set<Schema> visitedSchemas) {
458
458
} else if (ModelUtils .isAllOf (schema )) { // allOf
459
459
return normalizeAllOf (schema , visitedSchemas );
460
460
} else if (ModelUtils .isComposedSchema (schema )) { // composed schema
461
- ComposedSchema cs = (ComposedSchema ) schema ;
462
-
463
- if (ModelUtils .isComplexComposedSchema (cs )) {
464
- cs = (ComposedSchema ) normalizeComplexComposedSchema (cs , visitedSchemas );
461
+ if (ModelUtils .isComplexComposedSchema (schema )) {
462
+ schema = normalizeComplexComposedSchema (schema , visitedSchemas );
465
463
}
466
464
467
- if (cs .getAllOf () != null && !cs .getAllOf ().isEmpty ()) {
468
- return normalizeAllOf (cs , visitedSchemas );
465
+ if (schema .getAllOf () != null && !schema .getAllOf ().isEmpty ()) {
466
+ return normalizeAllOf (schema , visitedSchemas );
469
467
}
470
468
471
- if (cs .getOneOf () != null && !cs .getOneOf ().isEmpty ()) {
472
- return normalizeOneOf (cs , visitedSchemas );
469
+ if (schema .getOneOf () != null && !schema .getOneOf ().isEmpty ()) {
470
+ return normalizeOneOf (schema , visitedSchemas );
473
471
}
474
472
475
- if (cs .getAnyOf () != null && !cs .getAnyOf ().isEmpty ()) {
476
- return normalizeAnyOf (cs , visitedSchemas );
473
+ if (schema .getAnyOf () != null && !schema .getAnyOf ().isEmpty ()) {
474
+ return normalizeAnyOf (schema , visitedSchemas );
477
475
}
478
476
479
- if (cs .getProperties () != null && !cs .getProperties ().isEmpty ()) {
480
- normalizeProperties (cs .getProperties (), visitedSchemas );
477
+ if (schema .getProperties () != null && !schema .getProperties ().isEmpty ()) {
478
+ normalizeProperties (schema .getProperties (), visitedSchemas );
481
479
}
482
480
483
- if (cs .getAdditionalProperties () != null ) {
481
+ if (schema .getAdditionalProperties () != null ) {
484
482
// normalizeAdditionalProperties(m);
485
483
}
486
484
487
- return cs ;
485
+ return schema ;
488
486
} else if (schema .getProperties () != null && !schema .getProperties ().isEmpty ()) {
489
487
normalizeProperties (schema .getProperties (), visitedSchemas );
490
488
} else if (schema instanceof BooleanSchema ) {
0 commit comments