Skip to content

fix: omit nil maps and slices from deepObject marshalling - #161

Merged
mromaszewicz merged 2 commits into
oapi-codegen:mainfrom
SKalt:deeoObject-omit-nil-map-or-slice
Oct 23, 2026
Merged

mromaszewicz merged 2 commits into
oapi-codegen:mainfrom
SKalt:deeoObject-omit-nil-map-or-slice

Conversation

@SKalt

@SKalt SKalt commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Closes #160. This PR adds a reflect-based check to weed out map[any]any(nil) or []any(nil), which currently get marshalled as param[]=null. After this PR, nil pointers still get serialized as param[]=null

@SKalt
SKalt requested a review from a team as a code owner August 24, 2026 18:18
@mromaszewicz mromaszewicz added the bug Something isn't working label Oct 23, 2026
@mromaszewicz
mromaszewicz merged commit c702e06 into oapi-codegen:main Oct 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unexpected deepObject encoding of nil map

2 participants