You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# User.yamltitle: ""type: objectproperties:
id:
type: stringrequired:
- id
Configure an override like so:
overrides:
- files:
- my-document.yamlrules:
empty-title-property: off
While running, spectral lint my-document.yaml, this would work, but if I added any JSONPath expression to the file, it stops working. For example:
overrides:
- files:
- my-document.yaml#/components/schemasrules:
empty-title-property: off
Expected behavior
Empty title from referenced schema to be ignored
Environment (remove any that are not applicable):
cli: 6.3.0
OS: macOS 12
Additional context
I guess this is related to the issue described in the caveat, but it is confusing to me because while - my-document.yaml would work, - my-document.yaml#/ does not.
The problem that we face is that we run spectral on the root document, and not individually, but because our document has a lot of refs, this caveat prevents us from leveraging the override behaviour.
Are there any other workarounds other than having to run spectral lint for every single file?
Thanks!
The text was updated successfully, but these errors were encountered:
Please bear in mind that overrides are only applied to the root documents. If your documents have any external dependencies, i.e. $refs, the overrides won't apply.
I guess it describes exactly my problem. But it feels confusing to me still in the example above.
Describe the bug
I'm trying to use the
overrides
feature to disable a rule for a set of components that haven't yet been migrated but I appear to be unable to do so.To Reproduce
Based on the example included as part of #2127:
Configure an override like so:
While running,
spectral lint my-document.yaml
, this would work, but if I added any JSONPath expression to the file, it stops working. For example:Expected behavior
Empty title from referenced schema to be ignored
Environment (remove any that are not applicable):
Additional context
I guess this is related to the issue described in the caveat, but it is confusing to me because while
- my-document.yaml
would work,- my-document.yaml#/
does not.The problem that we face is that we run spectral on the root document, and not individually, but because our document has a lot of refs, this caveat prevents us from leveraging the override behaviour.
Are there any other workarounds other than having to run
spectral lint
for every single file?Thanks!
The text was updated successfully, but these errors were encountered: