Open VikashKothary opened 3 years ago
The hope is to switch over to FastAPI which should do this out-of-the-box (see: https://github.com/ankicommunity/anki-api-server/issues/27). But there may be value in doing this in parallel. It wouldn't be code-first but the openapi documentation may be useful to users.
It's important to note that the API is likely to change (see: https://github.com/ankicommunity/anki-api-server/issues/22). So it could either be done after this change or before as a way of communicating the change of the API to users.
WHY: This will read the Django project and display interactive documentation on how to use the API minimising the barrier to entry for developing on top of the API. It will also allow for an API first approach to the API.
HOW: This was just the first one that came up when I googled it: https://django-rest-swagger.readthedocs.io/en/latest/. But there's a bunch of packages that might help with this.
WHAT: This is an example, see: https://petstore.swagger.io/.