Skip to content

Deserialize bracket-suffixed array query parameters - #488

Merged
geemus merged 3 commits into
masterfrom
fix/openapi3-bracket-array-query-params
Oct 8, 2026
Merged

geemus merged 3 commits into
masterfrom
fix/openapi3-bracket-array-query-params

Conversation

@ydah

@ydah ydah commented Sep 24, 2026

Copy link
Copy Markdown
Member

Rack parses ?ids[]=1&ids[]=2 into an ids array, but an OpenAPI 3 parameter declared as ids[] is left unmatched by parameter deserialization. Required parameters are reported missing, and array item coercion is skipped.

Normalize Rack arrays to the declared bracket-suffixed parameter name before validation. Add an integration test that checks integer coercion and confirms the Rack query hash remains unchanged.

Fixes: #369

@ydah
ydah force-pushed the fix/openapi3-bracket-array-query-params branch from 68248fd to 4000ce5 Compare September 24, 2026 07:20

@geemus geemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, thanks!

@geemus
geemus merged commit caa641b into master Oct 8, 2026
9 checks passed
@geemus
geemus deleted the fix/openapi3-bracket-array-query-params branch October 8, 2026 21:55
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.

Query parameters: Conversion of array items does not work if parameter name ends with "[]"

2 participants