Skip to content

feat: support spaceDelimited and pipeDelimited query parameter binding#117

Open
mromaszewicz wants to merge 2 commits intooapi-codegen:mainfrom
mromaszewicz:fix/issue-116
Open

feat: support spaceDelimited and pipeDelimited query parameter binding#117
mromaszewicz wants to merge 2 commits intooapi-codegen:mainfrom
mromaszewicz:fix/issue-116

Conversation

@mromaszewicz
Copy link
Member

@mromaszewicz mromaszewicz commented Mar 26, 2026

Make a concrete error type for missing required parameters.

Implement deserialization for spaceDelimited and pipeDelimited query parameter styles in both BindQueryParameterWithOptions and BindRawQueryParameter.

For explode=true, these styles are serialized identically to form explode=true (each value is a separate key=value pair), so they share the same code path. For explode=false, the values are split on their style-specific delimiter (space or pipe) instead of comma.

The BindRawQueryParameter implementation handles all space representations (%20, +, and literal space) for spaceDelimited.

Fixes #116

Implement deserialization for spaceDelimited and pipeDelimited query
parameter styles in both BindQueryParameterWithOptions and
BindRawQueryParameter.

For explode=true, these styles are serialized identically to form
explode=true (each value is a separate key=value pair), so they share
the same code path. For explode=false, the values are split on their
style-specific delimiter (space or pipe) instead of comma.

The BindRawQueryParameter implementation handles all space
representations (%20, +, and literal space) for spaceDelimited.

Fixes oapi-codegen#116

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@mromaszewicz mromaszewicz requested a review from a team as a code owner March 26, 2026 16:32
@mromaszewicz mromaszewicz added this to the 1.3.2 milestone Mar 26, 2026
…ry params

Export RequiredParameterError so generated server code can use
errors.As to detect missing required parameters and produce
framework-specific typed errors for application error handlers.

Previously these were plain fmt.Errorf strings that couldn't be
distinguished from format errors without string matching.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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.

Support spaceDelimited and pipeDelimited query parameter binding

1 participant