@hyperjump/json-schema 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/schema.js +4 -0
- package/package.json +1 -1
package/lib/schema.js
CHANGED
|
@@ -77,6 +77,10 @@ const processSchema = (subject, id, dialectId, pointer, anchors, dynamicAnchors)
|
|
|
77
77
|
if (jsonTypeOf(subject, "object")) {
|
|
78
78
|
// Embedded Schema
|
|
79
79
|
const embeddedDialectId = typeof subject.$schema === "string" ? toAbsoluteIri(subject.$schema) : dialectId;
|
|
80
|
+
if (!hasDialect(embeddedDialectId)) {
|
|
81
|
+
throw Error(`Encountered unknown dialect '${embeddedDialectId}'`);
|
|
82
|
+
}
|
|
83
|
+
|
|
80
84
|
const idToken = getKeywordName(embeddedDialectId, "https://json-schema.org/keyword/id");
|
|
81
85
|
if (typeof subject[idToken] === "string") {
|
|
82
86
|
subject[idToken] = resolveUri(subject[idToken], id);
|