Skip to content

api/apiresponse: Use DRF JsonEncoder in documented endpoint views

That encoder is used when querying the API for "application/json" content type. It handles more encoding cases than the default one (notably it knows how to encode a swh.model.collections.ImmutableDict), so let's also use it when generating HTML documentation for the API endpoints.

Test Plan

I added a test to cover the issue discovered by @moranegg but this clearly calls for tests improvements so I also created #2529 (closed).


Migrated from D3826 (view on Phabricator)

Merge request reports