Comparing version 0.2.4 to 0.2.5
@@ -23,3 +23,3 @@ 'use strict'; | ||
if (typeof value === 'object') { | ||
if (typeof value === 'object' && !(key === 'enum' || key === 'required')) { | ||
expand(value, parent, callback); | ||
@@ -41,12 +41,7 @@ } | ||
var copy = cloneObj(schema); | ||
var copy = cloneObj(schema), | ||
base = $.resolveURL(copy.$schema || SCHEMA_URI, fakeroot || ''); | ||
if (!copy.$schema) { | ||
copy.$schema = fakeroot || SCHEMA_URI; | ||
} else { | ||
copy.$schema = $.resolveURL(copy.$schema, fakeroot || SCHEMA_URI); | ||
} | ||
copy.id = $.resolveURL(base, copy.id || '#'); | ||
copy.id = $.resolveURL(copy.$schema, copy.id || '#'); | ||
expand(copy, copy.id, push); | ||
@@ -53,0 +48,0 @@ |
@@ -27,3 +27,3 @@ 'use strict'; | ||
if (typeof value === 'object') { | ||
if (typeof value === 'object' && !(key === 'enum' || key === 'required')) { | ||
copy[key] = clone(value, refs, true, expand); | ||
@@ -30,0 +30,0 @@ } else { |
{ | ||
"name": "deref", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "JSON-Schema $ref resolution", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
10396
262