@@ -51,7 +51,7 @@ class JSONSchemaMarkdown {
51
51
52
52
/**
53
53
* Shorthand method to generate markdown from JSON Schema.
54
- * This is not the prefered method as errors will be more difficult to expose.
54
+ * This is not the preferred method as errors will be more difficult to expose.
55
55
* @param {Object|String } schema JS object or JSON string.
56
56
* @returns {String } generated markdown
57
57
*/
@@ -70,7 +70,7 @@ class JSONSchemaMarkdown {
70
70
try {
71
71
this . schema = JSON . parse ( schema ) ;
72
72
} catch ( e ) {
73
- this . error ( 'invalid json' ) ;
73
+ this . error ( 'invalid json: ' + e . stack ) ;
74
74
}
75
75
} else {
76
76
this . schema = schema ;
@@ -223,8 +223,8 @@ class JSONSchemaMarkdown {
223
223
}
224
224
if ( this . notEmpty ( data . exclusiveMinimum ) || this . notEmpty ( data . exclusiveMaximum ) ) {
225
225
this . indent ( level ) ;
226
- this . markdown += "Exlusive Range: " ;
227
- this . writeMinMaxExlusive ( data . exclusiveMinimum , data . exclusiveMaximum ) ;
226
+ this . markdown += "Exclusive Range: " ;
227
+ this . writeMinMaxExclusive ( data . exclusiveMinimum , data . exclusiveMaximum ) ;
228
228
}
229
229
this . writeMultipleOf ( data . multipleOf ) ;
230
230
}
@@ -280,7 +280,7 @@ class JSONSchemaMarkdown {
280
280
}
281
281
282
282
/**
283
- * This method is a catch for schema types that aren't recongized .
283
+ * This method is a catch for schema types that aren't recognized .
284
284
* You may want to treat anything resolving to this method as an error.
285
285
* @param {name } name The JSON property name
286
286
* @param {Object } data The JS data for the schema
@@ -445,7 +445,7 @@ class JSONSchemaMarkdown {
445
445
446
446
/**
447
447
* Write notation for inclusive minimum and maximum.
448
- * @param {number } min Inclusive minimim
448
+ * @param {number } min Inclusive minimum
449
449
* @param {number } max Inclusive maximum
450
450
*
451
451
*/
@@ -461,11 +461,11 @@ class JSONSchemaMarkdown {
461
461
462
462
/**
463
463
* Write notation for exclusive minimum and maximum.
464
- * @param {number } min Exclusive minimim
464
+ * @param {number } min Exclusive minimum
465
465
* @param {number } max Exclusive maximum
466
466
*
467
467
*/
468
- writeMinMaxExlusive ( min , max ) {
468
+ writeMinMaxExclusive ( min , max ) {
469
469
if ( this . notEmpty ( min ) ) {
470
470
this . markdown += " > " + min + "\n" ;
471
471
}
0 commit comments