Skip to content

feat: decode bare string values into struct parameters - #51

Open
zoov-xavier wants to merge 1 commit into
schmurfy:masterfrom
birotaio:feat/bare-string-struct-params
Open

zoov-xavier wants to merge 1 commit into
schmurfy:masterfrom
birotaio:feat/bare-string-struct-params

Conversation

@zoov-xavier

Copy link
Copy Markdown
Contributor

Query or path parameters typed as a struct decoding itself from a JSON string, like a date, fail unless the client quotes the value.

Struct parameters now use encoding.TextUnmarshaler when implemented, and a bare value that is not valid JSON is decoded as a JSON string.

  • ?date=2024-01-31 works for a date struct
  • Struct parameters given as JSON objects are unchanged

🤖 Generated with Claude Code

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