When linting two schemas that both reference a schema in another file, which references a recursive schema in another file, a false "ref does not exist" error is generated.
To Reproduce
Create rules.yml
extends:
- [spectral:oas, recommended]
rules:
info-contact: off
oas3-api-servers: off
operation-description: off
foo.yml
1:1 error invalid-ref '#/components/schemas/Recursive' does not exist components.schemas.Proxy.properties.recursive.properties.next.$ref
Expected behavior
No error is produced.
Environment (remove any that are not applicable):
Spectral version: 6.11.0
Additional context
Only linting a single schema, foo.yml or bar.yml at a time, makes the error disappear.
Inlining any ref or moving it into another file, makes the error disappear.
Describe the bug
When linting two schemas that both reference a schema in another file, which references a recursive schema in another file, a false "ref does not exist" error is generated.
To Reproduce
spectral lint --ruleset rules.yml foo.yml bar.yml
Expected behavior No error is produced.
Environment (remove any that are not applicable):
Additional context Only linting a single schema, foo.yml or bar.yml at a time, makes the error disappear. Inlining any ref or moving it into another file, makes the error disappear.