addons-server icon indicating copy to clipboard operation
addons-server copied to clipboard

Drf-spectacular

Open KevinMind opened this issue 7 months ago • 1 comments

Relates to: mozilla/addons#15019

Description

Replace drf_yasg with drf_spectacular as the more maintained and v3 supporting library. The new lib has better control over documenting serializers and supports the openapi spec v3 which natively has better type support.

https://drf-spectacular.readthedocs.io/en/latest/drf_yasg.html

Testing

Run the application locally:

make up

Now open the api docs: http://olympia.test/api/v5/swagger

Expect the docs to load, you should see operations and descriptions.

Checklist

  • [x] Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • [X] Successfully verified the change locally.
  • [X] The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • [ ] Add before and after screenshots (Only for changes that impact the UI).
  • [ ] Add or update relevant docs reflecting the changes made.

KevinMind avatar Jul 16 '24 17:07 KevinMind