-
-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect deduplication after 1.18.2 #2506
Comments
What do your transitive dependencies look like? |
Thanks, it seems like I have globally installed spectral which has broken modules. When I run it from locally created ./node_modules/.bin/spectral evrything works like in your screenshot. But anyway it breaks previous logic. Previously such errors were with full path, e.g. Now its path is not related to paths. |
The issue is caused by the type set on components:
schemas:
Error:
type: string # this is what causes the error That logic is always meant to show the actual location that violated the rule (looks like there was some minor bug in the previous logic that didn't quite did that), and in that case it's the type keyword under the Error component, so the outcome it expected. |
Well, if this is the expected behavior, I think the best thing we can do is just change our tools to match that. |
Describe the bug
After updating to 1.18.2, spectral begins incorrectly showing path if there are any $ref usages in path.
To Reproduce
and rules in rules.yaml:
given
property of the rule.Expected behavior
It should output 2 errors as it relates to different paths:
Environment (remove any that are not applicable):
Additional context
It worked as expected a week ago but now it is broken. I think it is related to #2501
The text was updated successfully, but these errors were encountered: