Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(go): make sure boolean types are created as pointer types #1275

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Nkmol
Copy link

@Nkmol Nkmol commented Apr 30, 2024

Go boolean types can sometimes conflict with serialization when a boolean value is not required. In this case, a value false would not be sent as it triggers omitempty. Using a pointer type makes sure the value is only omitted when nil, and not when false.

Fixes swagger-api/swagger-codegen#7391

@Nkmol Nkmol force-pushed the fix-go-boolean-types branch from 528db9f to 4ad1a72 Compare May 17, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Go] optional boolean properties set to false are omitted when encoded
1 participant