Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit 15fc536

Browse files
mromaszewiczclaude
authored andcommitted
fix: pass OpenAPI type/format to runtime parameter binding and styling functions
Update all parameter binding and styling call sites across all server templates and the client template to pass the OpenAPI schema Type and Format through to the runtime library. This enables the runtime (v1.2.0+) to correctly handle format: byte parameters by base64-encoding/decoding the value, instead of incorrectly treating []byte as a generic []uint8 slice. Changes: - Add SchemaType() and SchemaFormat() helper methods to ParameterDefinition - Update BindStyledParameterWithOptions calls in all 7 server templates (echo, chi, stdhttp, gin, gorilla, fiber, iris) to include Type/Format - Replace BindQueryParameter with BindQueryParameterWithOptions in all 7 server templates, passing Type/Format via options struct - Replace StyleParamWithLocation with StyleParamWithOptions in client.tmpl, passing Type/Format via options struct - Regenerate all test fixtures Requires a minimum of runtime v1.2.0. Closes #173 Closes oapi-codegen#2248 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 28d0083 commit 15fc536

36 files changed

Lines changed: 204 additions & 184 deletions

File tree

examples/petstore-expanded/fiber/api/petstore-server.gen.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/petstore-expanded/stdhttp/api/petstore.gen.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/any_of/param/param.gen.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/cookies/cookies.gen.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-1180/issue.gen.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-1378/bionicle/bionicle.gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-1378/fooservice/fooservice.gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-2031/prefer/issue2031.gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-2232/issue2232.gen.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-312/issue.gen.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)