A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI (v3.1, v3.0, and v2.0), Arazzo v1.0, as well as AsyncAPI v2.x.
For support questions, please use the Stoplight Discord Community. This repository's issues are reserved for feature requests and bug reports. If you are unsure if you are experiencing a bug, our Discord is a great place to start.
Please delete this section, any any sections below that you don't use, before creating the issue.
That is, it applies the override to every file, regardless of format.
To Reproduce
See above.
Expected behavior
There should be a way to override rules for particular formats. Specifying both files and formats should use intersection logic not union logic. (If union logic is desired you should just make two entries.)
We currently don't allow overrides based on formats alone.
The documentation is possibly a tad misleading here.
As things stand, you always need to specify files.
Describe the bug
The docs say you can apply overrides to particular formats. https://docs.stoplight.io/docs/spectral/293426e270fac-overrides
However, there does not seem to be a way to do this properly.
If I create a config like so:
I get an error
As per the error,
files
is required, even though I don't intend to filter by file name.If I try to add something for
files
, it seems to do a union rather than an intersection.That is, it applies the override to every file, regardless of format.
To Reproduce
See above.
Expected behavior
There should be a way to override rules for particular formats. Specifying both files and formats should use intersection logic not union logic. (If union logic is desired you should just make two entries.)
Environment (remove any that are not applicable):