Swagger Documentation Generator for Django REST Framework: deprecated
This project is no longer being maintained. Please consider drf-yasg as an alternative/successor. I haven’t personally used it, but it looks feature-complete and is actively maintained.
Thanks for all the support and contributions over the years. Special thanks to Lights on Software, Lincoln Loop and BNOTIONS for generously donating time to work on this project ❤️.
Full documentation: http://marcgibbons.github.io/django-rest-swagger/
pip install django-rest-swagger
Add rest_framework_swagger
to your INSTALLED_APPS
setting:
INSTALLED_APPS = (
...
'rest_framework_swagger',
)
This package ships with two renderer classes:
OpenAPIRenderer
generates the OpenAPI (fka Swagger) JSON schema specification. This renderer will be presented if:Content-Type: application/openapi+json
is specified in the headers.?format=openapi
is passed as query paramSwaggerUIRenderer
generates the Swagger UI and requires the OpenAPIRenderer
from django.conf.urls import url
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='Pastebin API')
urlpatterns = [
url(r'^$', schema_view)
]
$ tox
to execute the test suite against all supported environments../runtests.py
to run the test suite within the current environment.Please report bugs by opening an issue
Contributions are welcome and are encouraged!
Many thanks to Tom Christie & all the contributors who have developed Django REST Framework