0 purchases
restswagger 1.0.0
.. role:: python(code)
:language: python
Rest-Swagger
An API documentation generator for Swagger UI and Django REST Framework
Installation
pip install rest-swagger
Add rest_swagger to your INSTALLED_APPS setting:
INSTALLED_APPS = (
...
'rest_swagger',
)
Rendering Swagger Specification and Documentation
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 param
SwaggerUIRenderer generates the Swagger UI and requires the OpenAPIRenderer
Quick Start Example:
from django.conf.urls import url
from rest_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='Pastebin API')
urlpatterns = [
url(r'^$', schema_view)
]
Requirements
Django >=2.2
Django REST framework >=3.5
Python >=3.7
Bugs & Contributions
Please report bugs by opening an issue
Contributions are welcome and are encouraged!
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.