@@ -210,15 +210,30 @@ private String schema(ChangedSchema schema) {
210210 private String schema (int deepness , ChangedSchema schema ) {
211211 StringBuilder sb = new StringBuilder ("" );
212212 sb .append (listDiff (deepness , "enum" , schema .getChangeEnum ()));
213- sb .append (properties (deepness , "Added property" , schema .getIncreasedProperties ()));
214- sb .append (properties (deepness , "Deleted property" , schema .getMissingProperties ()));
213+ sb .append (properties (deepness , "Added property" , schema .getIncreasedProperties (), true ));
214+ sb .append (properties (deepness , "Deleted property" , schema .getMissingProperties (), false ));
215215 schema .getChangedProperties ().forEach ((name , property ) -> sb .append (property (deepness , name , property )));
216216 return sb .toString ();
217217 }
218218
219- private String properties (int deepness , String title , Map <String , Schema > properties ) {
219+
220+ private String schema (int deepness , Schema schema ) {
221+ StringBuilder sb = new StringBuilder ("" );
222+ sb .append (listItem (deepness , "Enum" , schema .getEnum ()));
223+ sb .append (properties (deepness , "Property" , schema .getProperties (), true ));
224+ return sb .toString ();
225+ }
226+
227+ private String properties (final int deepness , String title , Map <String , Schema > properties , boolean showContent ) {
220228 StringBuilder sb = new StringBuilder ("" );
221- properties .entrySet ().stream ().map ((entry ) -> property (deepness , title , entry .getKey (), entry .getValue ())).forEach (sb ::append );
229+ if (properties != null ) {
230+ properties .forEach ((key , value ) -> {
231+ sb .append (property (deepness , title , key , value ));
232+ if (showContent ) {
233+ sb .append (schema (deepness + 1 , value ));
234+ }
235+ });
236+ }
222237 return sb .toString ();
223238 }
224239
@@ -238,7 +253,7 @@ private String property(int deepness, String title, String name, Schema schema)
238253 }
239254
240255 private String property (int deepness , String title , String name , String type , String description ) {
241- return format ("%s* %s `%s` (%s)\n %s\n " , indent (deepness ), title , name , type , description (indent (deepness + 1 ), description ));
256+ return format ("%s* %s `%s` (%s)\n %s\n " , indent (deepness ), title , name , type == null ? "object" : type , description (indent (deepness + 1 ), description ));
242257 }
243258
244259 private String listDiff (int deepness , String name , ListDiff listDiff ) {
0 commit comments