Resolving top-level $ref
fails with TypeError: Converting circular structure to JSON
#382
Labels
$ref
fails with TypeError: Converting circular structure to JSON
#382
Uh oh!
There was an error while loading. Please reload this page.
When using
$ref
on the top-level to reference a defined type in$defs
it wrongly results in aTypeError: Converting circular structure to JSON
which is not a circular reference.According to the JSON Schema Core Specification Draft 2020-12 (see
7.5. Applicators
) it is valid to use$ref
on the top-level.Here's a example schema:
Trying to resolve this issue using the following test program:
Results in the following error:
It has been reproduced with version
12.0.1
of@apidevtools/json-schema-ref-parser
.The resolution of this issue is required for skriptfabrik/json-schema-bundler#28.
The text was updated successfully, but these errors were encountered: