Closes: oapi-codegen#131
MarshalDeepObject emitted raw bytes for values, map keys, and paramName.
Previously masked by oapi-codegen v2.6.0's client re-encoding via
url.Values.Encode(); v2.7.0 stopped re-encoding (PR #2307), exposing
the bug as 400s against RFC3986-compliant servers and silent
query-string injection from '&' in values.
The fix passes values, each path segment, and the paramName through
url.QueryEscape, matching the v2.6.0-effective behavior. Adds
TestDeepObject_URLEncoding (51 sub-cases) covering reserved chars,
non-ASCII, emoji, control bytes across values, map keys, and param
names. Documents the unmarshal-side ambiguity for literal [ ] in keys
(inherent to the deepObject format, matches qs/Rails behavior).
Closes: #131
MarshalDeepObject emitted raw bytes for values, map keys, and paramName. Previously masked by oapi-codegen v2.6.0's client re-encoding via url.Values.Encode(); v2.7.0 stopped re-encoding (PR #2307), exposing the bug as 400s against RFC3986-compliant servers and silent query-string injection from '&' in values.
The fix passes values, each path segment, and the paramName through url.QueryEscape, matching the v2.6.0-effective behavior. Adds TestDeepObject_URLEncoding (51 sub-cases) covering reserved chars, non-ASCII, emoji, control bytes across values, map keys, and param names. Documents the unmarshal-side ambiguity for literal [ ] in keys (inherent to the deepObject format, matches qs/Rails behavior).