Skip to content

Commit ca633e5

Browse files
Mentioned the "ignore" setting for the dereference.circular option
1 parent f0fe64a commit ca633e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ JSON Schema files can contain [circular $ref pointers](https://gist.github.com/B
8787

8888
You can disable circular references by setting the [`dereference.circular`](options.md) option to `false`. Then, if a circular reference is found, a `ReferenceError` will be thrown.
8989

90+
Or you can choose to just ignore circular references altogether by setting the [`dereference.circular`](options.md) option to `"ignore"`. In this case, all non-circular references will still be dereferenced as normal, but any circular references will remain in the schema.
91+
9092
Another option is to use the [`bundle`](ref-parser.md#bundleschema-options-callback) method rather than the [`dereference`](ref-parser.md#dereferenceschema-options-callback) method. Bundling does _not_ result in circular references, because it simply converts _external_ `$ref` pointers to _internal_ ones.
9193

9294
```javascript

0 commit comments

Comments
 (0)