Skip to content

Comments

fix: bind Date and Time query params as scalar values (#21)#93

Open
mromaszewicz wants to merge 1 commit intooapi-codegen:mainfrom
mromaszewicz:fix/issue-21
Open

fix: bind Date and Time query params as scalar values (#21)#93
mromaszewicz wants to merge 1 commit intooapi-codegen:mainfrom
mromaszewicz:fix/issue-21

Conversation

@mromaszewicz
Copy link
Member

BindQueryParameter treated all structs as key-value objects in the non-exploded form path, causing types.Date and time.Time to fail with "property/values need to be pairs". Scalar struct types that implement Binder or encoding.TextUnmarshaler are now bound directly via their interface methods instead of being routed to bindSplitPartsToDestinationStruct.

Also adds Binder implementation to types.Date so it self-identifies as a scalar binding target.

BindQueryParameter treated all structs as key-value objects in the
non-exploded form path, causing types.Date and time.Time to fail with
"property/values need to be pairs". Scalar struct types that implement
Binder or encoding.TextUnmarshaler are now bound directly via their
interface methods instead of being routed to bindSplitPartsToDestinationStruct.

Also adds Binder implementation to types.Date so it self-identifies as a
scalar binding target.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mromaszewicz mromaszewicz requested a review from a team as a code owner February 24, 2026 06:29
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.

1 participant