add tests for https://github.com/oapi-codegen/oapi-codegen/issues/2183 by TelpeNight · Pull Request #2184 · oapi-codegen/oapi-codegen
The generated client code was round-tripping styled query parameter fragments through url.ParseQuery + url.Values.Encode(), which re-encoded comma delimiters as %2C. Per the OpenAPI spec, form/explode=false arrays should use literal commas as delimiters (e.g. color=blue,black,brown). Change the client template to collect pre-encoded fragments from StyleParamWithLocation and join them directly, bypassing the re-encoding. Also moves the issue-2183 test to internal/test/issues/issue-2183/, extends it with explode=true and multi-param cases, and documents the remaining server-side limitation (oapi-codegen/runtime#91) for values containing embedded commas. Fixes oapi-codegen#2183 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts: # internal/test/any_of/param/param.gen.go # internal/test/parameters/parameters.gen.go # internal/test/schemas/schemas.gen.go # pkg/codegen/templates/client.tmpl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters