swagger-api / swagger-codegen-generators

Apache License 2.0
284 stars 424 forks source link

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

Open Nkmol opened 7 months ago

Nkmol commented 7 months ago

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 https://github.com/swagger-api/swagger-codegen/issues/7391