safe-client-gateway icon indicating copy to clipboard operation
safe-client-gateway copied to clipboard

Implement serialisation and output DTOs

Open hectorgomezv opened this issue 2 years ago • 2 comments

Dependencies

  • [ ] Centralise schemas and data validation (TODO: link to issue)

Context here.

Summary Currently, as shown in the context link, we have some inconsistencies between the current Client Gateway implementation responses and this new service ones. The idea here is, instead of doing ad hoc mapping in the services to the expected formats, having DTOs providing the expected payload format, and implement a serialisation layer which takes "service objects" and converts them to "presentation objects" to fulfil client's requirements.

Note We could do some additional research here to see what's the best solution, but we're already using AJV to validate incoming payloads so we could use it for serialisation as well.

hectorgomezv avatar Sep 02 '22 09:09 hectorgomezv

Blocked by #69

hectorgomezv avatar Nov 24 '22 11:11 hectorgomezv

Blocked by #69

More importantly. Do we need/want this. Even if the issue #69 is closed.

fmrsabino avatar Nov 24 '22 11:11 fmrsabino

Closing this as with the pseudo automatic SDK generation @iamacook implemented, no room for inconsistencies between the CGW and its clients would be possible.

hectorgomezv avatar Aug 20 '24 14:08 hectorgomezv