Extend deepObject testing to include unicode#2381
Conversation
Greptile SummaryThis PR adds unicode coverage for deepObject query parameter round-trips. The main changes are:
Confidence Score: 4/5This is close, but one test path should be covered before merging.
|
| Filename | Overview |
|---|---|
| internal/test/parameters/param_roundtrip_test.go | Adds the shared unicode/reserved-character deepObject round-trip regression test. |
| internal/test/go.mod | Bumps the internal test module to runtime v1.4.1. |
Reviews (1): Last reviewed commit: "Extend deepObject testing to include uni..." | Re-trigger Greptile
| t.Run("deepObject with unicode and reserved chars", func(t *testing.T) { | ||
| adversarial := paramclient.ComplexObject{ | ||
| Object: paramclient.Object{ | ||
| FirstName: "filter&q=こんにちは", | ||
| Role: "admin role+with spaces", | ||
| }, | ||
| Id: 12345, | ||
| IsAdmin: true, | ||
| } | ||
| params := paramclient.GetDeepObjectParams{DeepObj: adversarial} | ||
| req, err := paramclient.NewGetDeepObjectRequest(server, ¶ms) | ||
| require.NoError(t, err) | ||
| var got paramclient.GetDeepObjectParams | ||
| doRoundTrip(t, req, &got) | ||
| assert.Equal(t, adversarial, got.DeepObj) |
There was a problem hiding this comment.
This new regression only runs through the shared parameter round-trip suite. Echo v5 has its own separate internal/test/parameters/echov5/echov5_param_test.go suite with an ASCII-only deepObject case, while its generated client uses the same StyleParamWithOptions raw query fragment path. If unicode or reserved-character deepObject serialization regresses in that Echo v5 path, this test will still pass.
Closes oapi-codegen#2378 Since we test nearly everything in ASCII, we missed some failures in runtime around marshaling parameters. Extend the deepObject test to catch issues if they resurface. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
3bc82a8 to
6c6376a
Compare
Closes #2378
Since we test nearly everything in ASCII, we missed some failures in runtime around marshaling parameters. Extend the deepObject test to catch issues if they resurface.