The way we pass through data from upstream APIs is currently a bit haphazard:
- Sometimes we just pass objects through, so if we change the upstream API, the change just automatically happens here too
- Sometimes we explicitly pick out specific fields, so an upstream change that we want to reflect here has to be explicitly accounted for
- Sometimes we apply a transformation to the data
This is a bit inconsistent. The idea is currently a bit half-baked, but it feels like there is scope to make this all much more obvious/predictable/consistent at all layers of the object hierarchy by applying a schema to the input and output data instead of adding ad-hoc rules, but I need to put more thought into it..