FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Explain how to send nested objects when style serialization fails by mromaszewicz · Pull Request #141 · oapi-codegen/runtime · GitHub

Explain how to send nested objects when style serialization fails - #141

Merged
mromaszewicz merged 1 commit into
mainfrom
fix/issue-52
Jul 12, 2026
Merged

Explain how to send nested objects when style serialization fails#141
mromaszewicz merged 1 commit into
mainfrom
fix/issue-52

Conversation

Copy link
Copy Markdown
Member

Refs: #52

Styling a parameter whose object schema contains a nested object failed with a bare "unsupported type Header", which gives no hint that the spec itself defines no wire format for this. OpenAPI style-based serialization covers only primitives, arrays, and flat objects; complex values are meant to use the parameter's content form (e.g. content: application/json).

When a struct or map reaches primitiveToString without satisfying any of the serialization escape hatches, the error now says exactly that and points at declaring the parameter with content: application/json (or mapping the schema to a Go type implementing fmt.Stringer). Behavior is otherwise unchanged: nested objects still fail to serialize, by design.

Refs: #52

Styling a parameter whose object schema contains a nested object failed
with a bare "unsupported type Header", which gives no hint that the spec
itself defines no wire format for this. OpenAPI style-based serialization
covers only primitives, arrays, and flat objects; complex values are meant
to use the parameter's content form (e.g. `content: application/json`).

When a struct or map reaches primitiveToString without satisfying any of
the serialization escape hatches, the error now says exactly that and
points at declaring the parameter with `content: application/json` (or
mapping the schema to a Go type implementing fmt.Stringer). Behavior is
otherwise unchanged: nested objects still fail to serialize, by design.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mromaszewicz requested a review from a team as a code owner July 12, 2026 21:59
mromaszewicz added the documentation Improvements or additions to documentation label Jul 12, 2026
mromaszewicz merged commit 95c13c0 into main Jul 12, 2026
26 checks passed
mromaszewicz deleted the fix/issue-52 branch July 12, 2026 22:03
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL