We cannot unset tier alias, lifecycle alias in services because it can't tell the difference between those attributes being set to null or not included (since those fields are *string with omitempty).
This uses the same pattern as in IdentifierInput where if ID and alias are not set, it will JSON marshal into null.
Changelog
[x] Introduce NullableValue[T] (and constructors)
[x] Deprecate ServiceUpdateInput, add ServiceUpdateInputV2 (they are interchangeable)
[x] Make a changie entry
[x] Add table tests for service update, covering new and old update input struct types
Issues
https://github.com/OpsLevel/team-platform/issues/356
Why?
We cannot unset tier alias, lifecycle alias in services because it can't tell the difference between those attributes being set to
null
or not included (since those fields are*string
withomitempty
).This uses the same pattern as in
IdentifierInput
where if ID and alias are not set, it will JSON marshal intonull
.Changelog
NullableValue[T]
(and constructors)ServiceUpdateInput
, addServiceUpdateInputV2
(they are interchangeable)changie
entryNullableValue[T]