Skip to content

Support bracket-style OpenAPI 3 query params#472

Merged
geemus merged 1 commit intomasterfrom
fix/openapi3-bracket-query-params
Apr 12, 2026
Merged

Support bracket-style OpenAPI 3 query params#472
geemus merged 1 commit intomasterfrom
fix/openapi3-bracket-query-params

Conversation

@ydah
Copy link
Copy Markdown
Member

@ydah ydah commented Mar 26, 2026

Fixes: #327

This fixes OpenAPI 3 request validation for query parameters declared with bracket notation, for example:

- in: query
  name: filter[slug]
  required: true
  schema:
    type: string

Rack parses a request like ?filter[slug]=/test into a nested hash:

{ "filter" => { "slug" => "/test" } }

Before this change, Committee validated against the literal parameter name only, so the request was rejected as:

missing required parameters: filter[slug]

This change normalizes Rack-style nested query hashes into bracket notation before OpenAPI 3 parameter validation/deserialization when the schema expects bracket-style names.

@ydah ydah marked this pull request as draft March 26, 2026 22:15
@ydah ydah force-pushed the fix/openapi3-bracket-query-params branch from 2691703 to 12ff45a Compare March 30, 2026 14:16
@ydah ydah marked this pull request as ready for review March 30, 2026 14:24
Copy link
Copy Markdown
Member

@geemus geemus left a comment

Choose a reason for hiding this comment

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

Oops, sorry for the delay. I saw the draft, but missed it when you marked it ready for review.

lgtm

@geemus geemus merged commit 381745e into master Apr 12, 2026
9 checks passed
@geemus geemus deleted the fix/openapi3-bracket-query-params branch April 12, 2026 12:56
@ydah
Copy link
Copy Markdown
Member Author

ydah commented Apr 12, 2026

Thank you!

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.

Request validation does not support nested query parameters

2 participants