Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
Upgraded json-refs
Browse files Browse the repository at this point in the history
This will help some with #327 but it will not fix all of it.
  • Loading branch information
whitlockjc committed Jan 23, 2016
1 parent 1e8153b commit 3af8349
Show file tree
Hide file tree
Showing 12 changed files with 3,678 additions and 1,617 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
],
"dependencies": {
"async": "~1.3.0",
"json-refs": "~1.2.1",
"json-refs": "~2.0.5",
"js-yaml": "~3.3.1",
"lodash-compat": "~3.10.0",
"spark-md5": "~1.0.0",
Expand Down
8 changes: 4 additions & 4 deletions browser/swagger-tools-min.js

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions browser/swagger-tools-standalone-min.js

Large diffs are not rendered by default.

4,587 changes: 3,312 additions & 1,275 deletions browser/swagger-tools-standalone.js

Large diffs are not rendered by default.

360 changes: 208 additions & 152 deletions browser/swagger-tools.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports.createJsonValidator = function (schemas) {
console.error('JSON Schema file' + (schemas.length > 1 ? 's are' : ' is') + ' invalid:');

_.each(validator.getLastErrors(), function (err) {
console.error(' ' + (_.isArray(err.path) ? JsonRefs.pathToPointer(err.path) : err.path) + ': ' + err.message);
console.error(' ' + (_.isArray(err.path) ? JsonRefs.pathToPtr(err.path) : err.path) + ': ' + err.message);
});

throw new Error('Unable to create validator due to invalid JSON Schema');
Expand Down Expand Up @@ -198,7 +198,7 @@ module.exports.printValidationResults = function (version, apiDOrSO, apiDeclarat
}

_.each(entries, function (entry) {
stream(new Array(indent + 1).join(' ') + JsonRefs.pathToPointer(entry.path) + ': ' + entry.message);
stream(new Array(indent + 1).join(' ') + JsonRefs.pathToPtr(entry.path) + ': ' + entry.message);

if (entry.inner) {
printErrorsOrWarnings (undefined, entry.inner, indent + 2);
Expand Down
Loading

0 comments on commit 3af8349

Please sign in to comment.