Skip to content
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

Implemented an --ignore-file option to lint/report commands to ignore specific errors #515

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lobocv
Copy link

@lobocv lobocv commented Jul 2, 2024

The ignore-file is a YAML file that lists the paths for each rule for which to ignore errors for.
It can be used when introducing new linting rules which require breaking changes to existing production APIs.

In the example below, say I want to add a lint rule that new URLs must have a version in the path. This would break existing URLs which do not have versions in their path. We can use the ignorefile to grandfather those APIs while enforcing new APIs start using versioning.

Example ignorefile.yml using the burgershop API in the tests:

url-starts-with-major-version:
  - $.paths['/burgers']
  - $.paths['/burgers/{burgerId}']
  - $.paths['/burgers/{burgerId}/dressings']
  - $.paths['/dressings/{dressingId}']
  - $.paths['/dressings']

@lobocv lobocv changed the title Implemented an ignore-file option to lint/report commands to ignore specific errors Implemented an --ignore-file option to lint/report commands to ignore specific errors Jul 2, 2024
…s a YAML file that lists the paths for each rule for which to ignore errors for.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant