spectral
spectral copied to clipboard
Spectral not seeing problems with a badly $ref'ed document
Describe the bug
Box has a very invalid OpenAPI document, but Spectral doesn't seem to notice. It's got $ref's in all the wrong places, which should be warnings at least.
To Reproduce
- Given this OpenAPI/AsyncAPI document https://raw.githubusercontent.com/box/box-openapi/main/content/openapi.yml
- Run this CLI command
spectral lint https://raw.githubusercontent.com/box/box-openapi/main/content/openapi.ymlwithextends: spectral:oas - See there's lots of errors in various files but the only one for the main openapi.yml is
18:13 warning oas3-unused-component Potentially unused component has been detected. components.schemas.$ref.
Expected behavior
Errors about $ref in invalid locations. The spec is clear about where they can and cannot go.
Screenshots