Page MenuHomeSoftware Heritage

Use swh-model for passing objects instead of dicts
Open, NormalPublic


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.

Related Objects

Work in ProgressNone

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 Restricted Project.
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
ardumont updated the task description. (Show Details)Jan 28 2020, 1:32 PM