Some properties being sent via the Api might not come directly from the data object itself. Those include properties which are calculated by a certain logic that should not be leaked outside the application (e.g. via Javascript). These properties should be computed before being sent via the Api.
A computed property should be represented by a class with a get() and a set() method for computing the value with get() and writing data back by decomputing it with set().
Computed properties should be configurable by passing it into the serialize/deserialize methods of the Serializer or by defining them in a configuration YAML file.
Computed properties should contain a name, which is used for sending and retrieving the data as well as a supported class or interface respectively for which they can operate.
Some properties being sent via the Api might not come directly from the data object itself. Those include properties which are calculated by a certain logic that should not be leaked outside the application (e.g. via Javascript). These properties should be computed before being sent via the Api.
A computed property should be represented by a class with a
get()
and aset()
method for computing the value withget()
and writing data back by decomputing it withset()
.Computed properties should be configurable by passing it into the
serialize/deserialize
methods of the Serializer or by defining them in a configuration YAML file.Computed properties should contain a name, which is used for sending and retrieving the data as well as a supported class or interface respectively for which they can operate.