You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While circular references within a single schema are supported, the situation is different for circular references between several schemas. The code is
C:\work\circular-refs\node_modules\z-schema\src\Utils.js:4
return /^https?:\/\//.test(uri);
^
RangeError: Maximum call stack size exceeded
at RegExp.test (native)
at Object.exports.isAbsoluteUri (C:\work\circular-refs\node_modules\z-schema\src\Utils.js:4:27)
at mergeReference (C:\work\circular-refs\node_modules\z-schema\src\SchemaCompilation.js:8:15)
at collectReferences (C:\work\circular-refs\node_modules\z-schema\src\SchemaCompilation.js:52:18)
at collectReferences (C:\work\circular-refs\node_modules\z-schema\src\SchemaCompilation.js:82:13)
at ZSchema.collectReferences (C:\work\circular-refs\node_modules\z-schema\src\SchemaCompilation.js:82:13)
at ZSchema.exports.compileSchema (C:\work\circular-refs\node_modules\z-schema\src\SchemaCompilation.js:219:34)
at ZSchema.exports.getSchemaByUri (C:\work\circular-refs\node_modules\z-schema\src\SchemaCache.js:123:49)
at ZSchema.exports.compileSchema (C:\work\circular-refs\node_modules\z-schema\src\SchemaCompilation.js:224:51)
at ZSchema.exports.getSchemaByUri (C:\work\circular-refs\node_modules\z-schema\src\SchemaCache.js:123:49)
Hi!
While circular references within a single schema are supported, the situation is different for circular references between several schemas. The code is
And the output is
Trying to pass both schemas in array
produces invalid errors:
In the last case validation passes fine after the cycle is broken in one place, so, the references values themselves are not the reason.
Regards,
Konstantin
The text was updated successfully, but these errors were encountered: