Skip to content

Commit

Permalink
fixed bug in remote ref resolution, closes #70
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Nov 7, 2015
1 parent 73f48e6 commit 368332a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ module.exports = function(config) {
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,

browserNoActivityTimeout: 30000
browserNoActivityTimeout: 90000
});
};
2 changes: 1 addition & 1 deletion karma.sauce.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ module.exports = function(config) {
testName: 'Ajv'
},
captureTimeout: 600000,
browserNoActivityTimeout: 240000,
browserNoActivityTimeout: 300000,

customLaunchers: customLaunchers,

Expand Down
1 change: 1 addition & 0 deletions lib/compile/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function getJsonPointer(parsedRef, baseId, schema, root) {
if (res) {
schema = res.schema;
root = res.root;
baseId = res.baseId;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ajv",
"version": "1.4.8",
"version": "1.4.9",
"description": "Another JSON Schema Validator",
"main": "lib/ajv.js",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
]
},
{
"skip": true,
"description": "local hash ref with remote hash ref that has inner hash ref (#70)",
"schema": {
"definitions": {
Expand Down
15 changes: 13 additions & 2 deletions spec/tests/issues/70_swagger_schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[
{
"skip": true,
"description": "Swagger api schema does not compile (#70)",
"schema": {
"title": "A JSON Schema for Swagger 2.0 API.",
Expand Down Expand Up @@ -1595,8 +1594,20 @@
},
"tests": [
{
"description": "empty object is valid",
"description": "empty object is invalid",
"data": {},
"valid": false
},
{
"description": "minimal valid object",
"data": {
"swagger": "2.0",
"info": {
"title": "sample api definition",
"version": "0.1"
},
"paths": {}
},
"valid": true
}
]
Expand Down

0 comments on commit 368332a

Please sign in to comment.