Skip to content

Commit da3295e

Browse files
committed
Fix typos and print exception stack
1 parent 086e240 commit da3295e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/lib/JSONSchemaMarkdown.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class JSONSchemaMarkdown {
5151

5252
/**
5353
* 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.
5555
* @param {Object|String} schema JS object or JSON string.
5656
* @returns {String} generated markdown
5757
*/
@@ -70,7 +70,7 @@ class JSONSchemaMarkdown {
7070
try {
7171
this.schema = JSON.parse(schema);
7272
} catch (e) {
73-
this.error('invalid json');
73+
this.error('invalid json: ' + e.stack);
7474
}
7575
} else {
7676
this.schema = schema;
@@ -223,8 +223,8 @@ class JSONSchemaMarkdown {
223223
}
224224
if (this.notEmpty(data.exclusiveMinimum) || this.notEmpty(data.exclusiveMaximum)) {
225225
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);
228228
}
229229
this.writeMultipleOf(data.multipleOf);
230230
}
@@ -280,7 +280,7 @@ class JSONSchemaMarkdown {
280280
}
281281

282282
/**
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.
284284
* You may want to treat anything resolving to this method as an error.
285285
* @param {name} name The JSON property name
286286
* @param {Object} data The JS data for the schema
@@ -445,7 +445,7 @@ class JSONSchemaMarkdown {
445445

446446
/**
447447
* Write notation for inclusive minimum and maximum.
448-
* @param {number} min Inclusive minimim
448+
* @param {number} min Inclusive minimum
449449
* @param {number} max Inclusive maximum
450450
*
451451
*/
@@ -461,11 +461,11 @@ class JSONSchemaMarkdown {
461461

462462
/**
463463
* Write notation for exclusive minimum and maximum.
464-
* @param {number} min Exclusive minimim
464+
* @param {number} min Exclusive minimum
465465
* @param {number} max Exclusive maximum
466466
*
467467
*/
468-
writeMinMaxExlusive(min, max) {
468+
writeMinMaxExclusive(min, max) {
469469
if (this.notEmpty(min)) {
470470
this.markdown += " > " + min + "\n";
471471
}

0 commit comments

Comments
 (0)