This repository was archived by the owner on Apr 14, 2026. It is now read-only.
Commit 15fc536
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
- stdhttp/api
- internal/test
- any_of/param
- cookies
- issues
- issue-1180
- issue-1378
- bionicle
- fooservice
- issue-2031/prefer
- issue-2232
- issue-312
- issue-grab_import_names
- outputoptions/name-normalizer
- to-camel-case-with-additional-initialisms
- to-camel-case-with-digits
- to-camel-case-with-initialisms
- to-camel-case
- unset
- parameters
- schemas
- server
- strict-server
- chi
- client
- echo
- fiber
- gin
- gorilla
- iris
- stdhttp
- pkg/codegen
- templates
- chi
- echo
- fiber
- gin
- gorilla
- iris
- stdhttp
Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments