astefanutti commented on pull request #1850:
URL: https://github.com/apache/camel-k/pull/1850#issuecomment-741671672


   @tadayosi thanks. My understanding is that the issue occurs for boolean 
fields for which the traits constructor default the value to `true`. When such 
a field is set to `false` from the CLI, it is omitted in the integration JSON, 
then when the trait is initialised, the field is initialised to `true` and not 
overwritten by the trait configuration unmarshalling (as the field has been 
omitted). Note that mapstruct is not involved here. So, indeed, this is a 
typical case where using a `*bool` is required. An alternative would be to 
remove `json:",omitempty"`, but that leak defaulting into user-space.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to