add tests for https://github.com/oapi-codegen/oapi-codegen/issues/2183 by TelpeNight · Pull Request #2184 · oapi-codegen/oapi-codegen

@TelpeNight

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>

mromaszewicz

# 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

@mromaszewicz

@mromaszewicz

@mromaszewicz