Page MenuHomeSoftware Heritage

Use swh-model for passing objects instead of dicts
Closed, MigratedEdits Locked

Description

Currently, our API framework is designed in a way that all endpoints (both client-side and server-side) return/accept JSON-like objects (usually encoded with msgpack).

We should abstract this away in the implementation of the framework (in swh-core), so that they never have to deal with dicts representing SWH objects, and use classes from swh.model.Model instead.

Protocol-wise, this would not change anything; but it would allow all endpoints to be typed.

Event Timeline

vlorentz triaged this task as Normal priority.Jan 22 2020, 4:35 PM
vlorentz created this task.
vlorentz edited projects, added Core & foundations; removed Roadmap 2020.
vlorentz renamed this task from Use swh-model for passing objects instead of JSON/msgpack to Use swh-model for passing objects instead of dicts.Jan 27 2020, 4:51 PM
vlorentz claimed this task.