Skip to content

feat: add rule to validate query and querystring parameters usage#2551

Merged
n0rahh merged 19 commits intomainfrom
feat/add-support-for-querystring
Feb 17, 2026
Merged

feat: add rule to validate query and querystring parameters usage#2551
n0rahh merged 19 commits intomainfrom
feat/add-support-for-querystring

Conversation

@n0rahh
Copy link
Copy Markdown
Contributor

@n0rahh n0rahh commented Feb 10, 2026

What/Why/How?

A new rule has been added because if any parameters are in in: query, you cannot use in: querystring, and vice versa.

Reference

https://github.com/Redocly/redocly/issues/15509

Testing

Screenshots (optional)

Check yourself

  • Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • All new/updated code is covered by tests
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: c311a23

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/openapi-core Minor
@redocly/cli Minor
@redocly/respect-core Minor

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

@n0rahh n0rahh added the snapshot Create experimental release PR label Feb 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📦 A new experimental 🧪 version v0.0.0-snapshot.1770712109 of Redocly CLI has been published for testing.

Install with NPM:

npm install @redocly/cli@0.0.0-snapshot.1770712109
# or
npm install @redocly/openapi-core@0.0.0-snapshot.1770712109
# or
npm install @redocly/respect-core@0.0.0-snapshot.1770712109

⚠️ Note: This is a development build and may contain unstable features.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 10, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 79.51% (🎯 79%) 6356 / 7993
🔵 Statements 78.95% (🎯 78%) 6567 / 8317
🔵 Functions 83.45% (🎯 83%) 1306 / 1565
🔵 Branches 71.07% (🎯 71%) 4322 / 6081
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/config/all.ts 100% 100% 100% 100%
packages/core/src/config/minimal.ts 100% 100% 100% 100%
packages/core/src/config/recommended-strict.ts 100% 100% 100% 100%
packages/core/src/config/recommended.ts 100% 100% 100% 100%
packages/core/src/config/spec.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/index.ts 100% 100% 100% 100%
packages/core/src/rules/oas3/spec-querystring-parameters.ts 100% 83.33% 100% 100%
packages/core/src/types/redocly-yaml.ts 92.3% 82.85% 100% 91.93% 366-373, 375, 520-525, 528-533, 536-541
Generated in workflow #8650 for commit c311a23 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 10, 2026

CLI Version Mean Time ± Std Dev (s) Relative Performance (Lower is Faster)
cli-latest 3.633s ± 0.028s ▓ 1.00x
cli-next 3.616s ± 0.040s ▓ 1.00x (Fastest)

@n0rahh n0rahh marked this pull request as ready for review February 10, 2026 09:20
@n0rahh n0rahh requested review from a team as code owners February 10, 2026 09:20
Comment thread packages/core/src/config/spec.ts Outdated
Comment thread packages/core/src/rules/oas3/spec-no-mixed-query-and-querystring-parameters.ts Outdated
Comment thread .changeset/young-ghosts-drop.md Outdated
Comment thread packages/core/src/rules/oas3/spec-querystring-parameters.ts
Comment thread packages/core/src/config/minimal.ts Outdated
@n0rahh n0rahh requested a review from tatomyr February 12, 2026 10:59
Comment thread packages/core/src/rules/oas3/spec-querystring-parameters.ts Outdated
Comment thread packages/core/src/rules/oas3/spec-querystring-parameters.ts Outdated
Comment thread packages/core/src/rules/oas3/spec-querystring-parameters.ts Outdated
@n0rahh n0rahh requested a review from tatomyr February 13, 2026 09:10
Comment thread .changeset/young-ghosts-drop.md Outdated
@JLekawa
Copy link
Copy Markdown
Contributor

JLekawa commented Feb 13, 2026

@tatomyr: should this rule be documented in Built-in rules?

@tatomyr
Copy link
Copy Markdown
Collaborator

tatomyr commented Feb 13, 2026

@JLekawa certainly. And not only there but in some other places perhaps too (sidebars, rulesets, the rule's documentation page itself, etc.). @n0rahh please add the corresponding docs as well and mark the corresponding point:

image

Comment thread packages/core/src/config/spec.ts Outdated
@tatomyr
Copy link
Copy Markdown
Collaborator

tatomyr commented Feb 13, 2026

Please disregard the failing smokes. They are related to a separate issue.

@n0rahh n0rahh requested a review from JLekawa February 13, 2026 11:00
Comment thread .changeset/young-ghosts-drop.md Outdated
Comment thread docs/@v2/rules/oas/spec-querystring-parameters.md Outdated
Comment thread docs/@v2/rules/oas/spec-querystring-parameters.md Outdated
Comment thread docs/@v2/rules/oas/spec-querystring-parameters.md Outdated
Comment thread docs/@v2/rules/oas/spec-querystring-parameters.md Outdated
Comment thread docs/@v2/rules/oas/spec-querystring-parameters.md Outdated
Comment thread docs/@v2/rules/built-in-rules.md
@tatomyr
Copy link
Copy Markdown
Collaborator

tatomyr commented Feb 13, 2026

Left comments mostly related to the docs.
cc @JLekawa

@n0rahh n0rahh requested a review from tatomyr February 16, 2026 09:33
Copy link
Copy Markdown
Collaborator

@tatomyr tatomyr left a comment

Choose a reason for hiding this comment

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

Works for me as long as @JLekawa is okay with the doc changes.

Comment thread docs/@v2/rules/oas/spec-querystring-parameters.md Outdated
@n0rahh n0rahh merged commit 31ea755 into main Feb 17, 2026
42 checks passed
@n0rahh n0rahh deleted the feat/add-support-for-querystring branch February 17, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot Create experimental release PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants