New rule: request-contains-parameter
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 228
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 48
Description
Is your feature request related to a problem? Please describe.
We need a built-in rule similar to response-contains-header but for checking request parameters: request-contains-parameter
It can't be done with configurable rules properly as parameters may exists on multiple levels: Path-level params and Operation-levle params so we probably need a separate rule for this case.
Describe the solution you'd like
rules:
request-contains-parameter:
severity: error
parameters:
get:
- name: X-REQUEST-ID
in: header
post:
- name: X-REQUEST-ID
in: header
- name: X-CSRF-TOKEN
in: header
Describe alternatives you've considered
Maybe some different shapes of the parameters config?
Additional context
See related rule issue: https://github.com/Redocly/redocly-cli/issues/1253
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing response-contains-header rule and reviewing related issue #1253. Define how the proposed configuration handles parameters at both Path and Operation levels, then verify that method-specific header parameters such as X-REQUEST-ID and X-CSRF-TOKEN are checked as shown in the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100