@@ -126,10 +126,11 @@ class JSONSchemaMarkdown {
126
126
if ( this . notEmpty ( data . definitions ) ) {
127
127
path += "/definitions" ;
128
128
this . writeHeader ( "definitions" , level , path ) ;
129
- for ( var defName in data . definitions ) {
130
- var defPath = path + this . pathDivider + defName ;
131
- var definition = data . definitions [ defName ] ;
132
- this . generateChildren ( defName , definition , level + 1 , defPath ) ;
129
+ for ( var term in data . definitions ) {
130
+ var defPath = path + this . pathDivider + term ;
131
+ this . writeTerm ( term , level ) ;
132
+ this . generateChildren ( term , data . definitions [ term ] , level + 1 , defPath ) ;
133
+ this . writeLine ( "" , 0 ) ;
133
134
}
134
135
}
135
136
}
@@ -576,7 +577,19 @@ class JSONSchemaMarkdown {
576
577
writeSectionName ( name , level = 1 ) {
577
578
if ( this . notEmpty ( name ) ) {
578
579
this . writeLine ( '**_' + name + "_**" , level ) ;
580
+ }
579
581
}
582
+
583
+ /**
584
+ * Writes a definition term
585
+ * @param {String } term
586
+ * @param {Integer } level Indentation level
587
+ *
588
+ */
589
+ writeTerm ( term , level ) {
590
+ if ( this . notEmpty ( term ) ) {
591
+ this . writeLine ( '**_' + term + "_**" , level ) ;
592
+ }
580
593
}
581
594
582
595
/**
0 commit comments