Skip to content

Use swh-model for passing objects instead of dicts

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.


Migrated from T2244 (view on Phabricator)

Edited by Phabricator Migration user