@@ -210,15 +210,30 @@ private String schema(ChangedSchema schema) {
210
210
private String schema (int deepness , ChangedSchema schema ) {
211
211
StringBuilder sb = new StringBuilder ("" );
212
212
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 ));
215
215
schema .getChangedProperties ().forEach ((name , property ) -> sb .append (property (deepness , name , property )));
216
216
return sb .toString ();
217
217
}
218
218
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 ) {
220
228
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
+ }
222
237
return sb .toString ();
223
238
}
224
239
@@ -238,7 +253,7 @@ private String property(int deepness, String title, String name, Schema schema)
238
253
}
239
254
240
255
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 ));
242
257
}
243
258
244
259
private String listDiff (int deepness , String name , ListDiff listDiff ) {
0 commit comments