Skip to content

Conversation

@tx3stn
Copy link
Contributor

@tx3stn tx3stn commented Oct 31, 2025

The x-lint-ignore directive is only working for JSONPath based rules and fails to ignore custom function rules that report violations at different paths than where they're queried.

oas3-api-servers uses given: $ (root query) but reports violations at $.servers path.
When servers field didn't exist, there was nowhere to place the ignore directive so you can't ignore it.
This also means any ignores at the root of the document are not respected.

Minimal example to test:

x-lint-ignore: oas3-api-servers
openapi: 3.0.3
info:
  title: Test API
  version: 1.0.0
  x-lint-ignore: info-description
paths: {}
  1. run: vacuum lint spec.yaml --no-banner
  2. Observe the ignored rules are still reported.
  3. Rebuild with these changes.
  4. Observe ignored rules are no longer reported.

Copy link
Owner

@daveshanley daveshanley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean, as always. nice!

@daveshanley daveshanley added the release/patch Patch / non-breaking release label Nov 3, 2025
@daveshanley daveshanley merged commit 43a4957 into daveshanley:main Nov 3, 2025
3 of 4 checks passed
@tx3stn tx3stn deleted the lint-ignore-fixes branch November 3, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/patch Patch / non-breaking release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants