FirewallRuleProperties are not correct
Ntr0 opened this issue · 2 comments
Ntr0 commented
- Protocol must be
omitempty
. The description says this field is disallowed in update requests - All fields where the description states "Value null allows..." must NOT be
omitempty
, as setting null explicitly resets this certain property, e.g. Updating SourceIP from "10.10.10.1/32" tonull
will change the rule to allow ingress from all SourceIPs. This is not possible if these values are not produced when marshalling to json.
cristiGuranIonos commented
Right, but I think that the fix needs to be in MarshalJson function where the fields are checked against nil before serialisation.
Even though protocol is immutable for updates, it's also required for Post, which is why it doesn't have omitEmpty(for POST it can't be absent).
For MarshalJson protocol will keep being not serialised if it is sent as nil.
cristiGuranIonos commented
Fixed in V6.0.1