@hyperjump/json-schema
Advanced tools
Comparing version 1.9.5 to 1.9.6
@@ -46,3 +46,3 @@ import curry from "just-curry-it"; | ||
if (!(schema.document.dialectId in metaValidators)) { | ||
const metaSchema = await getSchema(schema.document.dialectId); | ||
const metaSchema = await getSchema(schema.document.dialectId, schema); | ||
const compiledSchema = await compile(metaSchema); | ||
@@ -49,0 +49,0 @@ metaValidators[schema.document.dialectId] = interpret(compiledSchema); |
@@ -79,6 +79,2 @@ import * as JsonPointer from "@hyperjump/json-pointer"; | ||
export const step = (key, node) => { | ||
if (node.type !== "object" && node.type !== "array") { | ||
return; | ||
} | ||
switch (node.type) { | ||
@@ -85,0 +81,0 @@ case "object": |
@@ -25,4 +25,6 @@ import contentTypeParser from "content-type"; | ||
browser = { _cache: {} }; | ||
} | ||
for (const uri in schemaRegistry) { | ||
for (const uri in schemaRegistry) { | ||
if (!(uri in browser._cache)) { | ||
browser._cache[uri] = schemaRegistry[uri]; | ||
@@ -32,3 +34,3 @@ } | ||
const schema = await browserGet(uri, browser); | ||
const schema = await browserGet(uri, { ...browser }); | ||
if (typeof schema.document.dialectId !== "string") { | ||
@@ -35,0 +37,0 @@ throw Error(`The document at ${schema.document.baseUri} is not a schema.`); |
{ | ||
"name": "@hyperjump/json-schema", | ||
"version": "1.9.5", | ||
"version": "1.9.6", | ||
"description": "A JSON Schema validator with support for custom keywords, vocabularies, and dialects", | ||
@@ -5,0 +5,0 @@ "type": "module", |
328041
8981