feat: add excludedPaths option to no-http-verbs-in-paths rule#2719
Open
tmchow wants to merge 4 commits intoRedocly:mainfrom
Open
feat: add excludedPaths option to no-http-verbs-in-paths rule#2719tmchow wants to merge 4 commits intoRedocly:mainfrom
tmchow wants to merge 4 commits intoRedocly:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 119c7f2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Hi @tmchow! Thanks for the contribution! |
JLekawa
approved these changes
Apr 7, 2026
tatomyr
reviewed
Apr 7, 2026
| | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | | ||
| | severity | string | Possible values: `off`, `warn`, `error`. Default `off` (in `recommended` configuration). | | ||
| | splitIntoWords | boolean | Matches http verbs when the string is split into words based on casing. This can reduce false positives. Default **false**. | | ||
| | excludedPaths | [string] | List of paths to exclude from the check. Use exact path strings (e.g. `/gettoken`). Default **[]**. | |
Collaborator
There was a problem hiding this comment.
Suggested change
| | excludedPaths | [string] | List of paths to exclude from the check. Use exact path strings (e.g. `/gettoken`). Default **[]**. | | |
| | excludedPaths | [string] | List of paths to exclude from the check. Use exact path strings (e.g. `/token`). Default **[]**. | |
Using verbs in path is generally discouraged, please use nouns in examples.
tatomyr
reviewed
Apr 7, 2026
Comment on lines
+77
to
+78
| - /gettoken | ||
| - /oauth/postback |
tatomyr
reviewed
Apr 7, 2026
| outdent` | ||
| openapi: 3.1.0 | ||
| paths: | ||
| /path/post: |
Daryna-del
reviewed
Apr 7, 2026
| | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | | ||
| | severity | string | Possible values: `off`, `warn`, `error`. Default `off` (in `recommended` configuration). | | ||
| | splitIntoWords | boolean | Matches http verbs when the string is split into words based on casing. This can reduce false positives. Default **false**. | | ||
| | excludedPaths | [string] | List of paths to exclude from the check. Use exact path strings (e.g. `/gettoken`). Default **[]**. | |
Contributor
There was a problem hiding this comment.
It looks like there’s a formatting issue. Could you please run npm run format to fix it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What/Why/How?
Adds an
excludedPathsoption to theno-http-verbs-in-pathsrule. Some paths contain HTTP verb substrings that are false positives (e.g./foo/profile-options/). This lets users exclude specific paths from evaluation without polluting the ignore file.Config:
The implementation adds one line to the rule: an early return when the path matches any entry in
excludedPaths. Matching is exact (full path string comparison).Reference
Fixes #1501
Testing
Added a test that verifies
/path/postis excluded while/get/pathis still reported.Check yourself
Security
This contribution was developed with AI assistance (Codex).