Skip to content
New issue

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

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

Already on GitHub? # 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
# for free to join this conversation on GitHub. Already have an account? # 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