@@ -236,16 +236,9 @@ private String schema(int deepness, ComposedSchema schema) {
236
236
if (schema .getAllOf () != null && schema .getAllOf () != null ) {
237
237
LOGGER .debug ("All of schema" );
238
238
schema .getAllOf ().stream ()
239
- .map (schema1 -> refPointer . resolveRef ( diff . getNewSpecOpenApi (). getComponents (), schema1 , schema1 . get$ref ()) )
239
+ .map (this :: resolve )
240
240
.forEach (composedChild -> sb .append (schema (deepness , composedChild )));
241
241
}
242
- // if (schema.getOneOf() != null && schema.getOneOf() != null) {
243
- // LOGGER.debug("One of schema");
244
- // sb.append(format("%sOne of:\n\n", indent(deepness)));
245
- // schema.getOneOf().stream()
246
- // .map(schema1 -> refPointer.resolveRef(diff.getNewSpecOpenApi().getComponents(), schema1, schema1.get$ref()))
247
- // .forEach(composedChild -> sb.append(schema(deepness + 1, composedChild)));
248
- // }
249
242
return sb .toString ();
250
243
}
251
244
@@ -256,7 +249,7 @@ private String schema(int deepness, Schema schema) {
256
249
if (schema instanceof ComposedSchema ) {
257
250
sb .append (schema (deepness , (ComposedSchema ) schema ));
258
251
} else if (schema instanceof ArraySchema ) {
259
- sb .append (items (deepness , (( ArraySchema ) schema ).getItems ()));
252
+ sb .append (items (deepness , resolve ((( ArraySchema ) schema ).getItems () )));
260
253
}
261
254
return sb .toString ();
262
255
}
@@ -273,9 +266,9 @@ private String properties(final int deepness, String title, Map<String, Schema>
273
266
StringBuilder sb = new StringBuilder ("" );
274
267
if (properties != null ) {
275
268
properties .forEach ((key , value ) -> {
276
- sb .append (property (deepness , title , key , value ));
269
+ sb .append (property (deepness , title , key , resolve ( value ) ));
277
270
if (showContent ) {
278
- sb .append (schema (deepness + 1 , value ));
271
+ sb .append (schema (deepness + 1 , resolve ( value ) ));
279
272
}
280
273
});
281
274
}
@@ -386,4 +379,8 @@ private String indent(int deepness) {
386
379
}
387
380
return sb .toString ();
388
381
}
382
+
383
+ private Schema resolve (Schema schema ) {
384
+ return refPointer .resolveRef (diff .getNewSpecOpenApi ().getComponents (), schema , schema .get$ref ());
385
+ }
389
386
}
0 commit comments