You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reset or clear the lan.properties.pcc field the cloud API expects the JSON field to have the value null.
The PCC field is a string pointer that annotated with omitempty. This means that when it is marshaled with the Go value nil the field is omitted.
Since the model can never have any value that produces the required JSON value of null in the PCC field, it is not possible to clear this value using this SDK.
I fixed this here by adding a separate struct that only contains the PCC field and allows to output null.
The text was updated successfully, but these errors were encountered:
Please bear in mind that the field should still be optional. If the default value produces null then it can't really be used for PATCH anymore because it must be set to the previous value to prevent overwrites
I would propose a custom MarshalJSON function that renders the empty string as null. That way nil can still be omitted and "" will unset the field. I think using the empty string is OK, because it is not a valid PCC ID value to begin with
Description
To reset or clear the
lan.properties.pcc
field the cloud API expects the JSON field to have the valuenull
.The PCC field is a string pointer that annotated with
omitempty
. This means that when it is marshaled with the Go valuenil
the field is omitted.Since the model can never have any value that produces the required JSON value of
null
in the PCC field, it is not possible to clear this value using this SDK.I fixed this here by adding a separate struct that only contains the PCC field and allows to output
null
.The text was updated successfully, but these errors were encountered: