@@ -267,15 +267,15 @@ class OpenAPI2DereferenceVisitor {
267
267
*
268
268
* Cases to consider:
269
269
* 1. We're crossing document boundary
270
- * 2. Fragment is from non-root document
270
+ * 2. Fragment is from non-entry document
271
271
* 3. Fragment is a Reference Object. We need to follow it to get the eventual value
272
272
* 4. We are dereferencing the fragment lazily/eagerly depending on circular mode
273
273
*/
274
- const isNonRootDocument = url . stripHash ( reference . refSet ! . rootRef ! . uri ) !== reference . uri ;
274
+ const isNonEntryDocument = url . stripHash ( reference . refSet ! . rootRef ! . uri ) !== reference . uri ;
275
275
const shouldDetectCircular = [ 'error' , 'replace' ] . includes ( this . options . dereference . circular ) ;
276
276
if (
277
277
( isExternalReference ||
278
- isNonRootDocument ||
278
+ isNonEntryDocument ||
279
279
isReferenceElement ( referencedElement ) ||
280
280
shouldDetectCircular ) &&
281
281
! ancestorsLineage . includesCycle ( referencedElement )
@@ -432,15 +432,15 @@ class OpenAPI2DereferenceVisitor {
432
432
*
433
433
* Cases to consider:
434
434
* 1. We're crossing document boundary
435
- * 2. Fragment is from non-root document
436
- * 3. Fragment is a Paht Item Object with $ref field. We need to follow it to get the eventual value
435
+ * 2. Fragment is from non-entry document
436
+ * 3. Fragment is a Path Item Object with $ref field. We need to follow it to get the eventual value
437
437
* 4. We are dereferencing the fragment lazily/eagerly depending on circular mode
438
438
*/
439
- const isNonRootDocument = url . stripHash ( reference . refSet ! . rootRef ! . uri ) !== reference . uri ;
439
+ const isNonEntryDocument = url . stripHash ( reference . refSet ! . rootRef ! . uri ) !== reference . uri ;
440
440
const shouldDetectCircular = [ 'error' , 'replace' ] . includes ( this . options . dereference . circular ) ;
441
441
if (
442
442
( isExternalReference ||
443
- isNonRootDocument ||
443
+ isNonEntryDocument ||
444
444
( isPathItemElement ( referencedElement ) && isStringElement ( referencedElement . $ref ) ) ||
445
445
shouldDetectCircular ) &&
446
446
! ancestorsLineage . includesCycle ( referencedElement )
@@ -612,15 +612,15 @@ class OpenAPI2DereferenceVisitor {
612
612
*
613
613
* Cases to consider:
614
614
* 1. We're crossing document boundary
615
- 2. Fragment is from non-root document
615
+ 2. Fragment is from non-entry document
616
616
* 3. Fragment is a JSON Reference Object. We need to follow it to get the eventual value
617
617
* 4. We are dereferencing the fragment lazily/eagerly depending on circular mode
618
618
*/
619
- const isNonRootDocument = url . stripHash ( reference . refSet ! . rootRef ! . uri ) !== reference . uri ;
619
+ const isNonEntryDocument = url . stripHash ( reference . refSet ! . rootRef ! . uri ) !== reference . uri ;
620
620
const shouldDetectCircular = [ 'error' , 'replace' ] . includes ( this . options . dereference . circular ) ;
621
621
if (
622
622
( isExternalReference ||
623
- isNonRootDocument ||
623
+ isNonEntryDocument ||
624
624
isJSONReferenceElement ( referencedElement ) ||
625
625
shouldDetectCircular ) &&
626
626
! ancestorsLineage . includesCycle ( referencedElement )
0 commit comments