Swagger documentation in Django
Project description
Django Swagger Render
Getting Started
Prerequisites
- python >= 3.5
- Django >= 2.0
Installation
Install using pip
pip install django-swagger-render
Add 'swagger_render' to your INSTALLED_APPS setting.
INSTALLED_APPS = [
...
'swagger_render',
]
Create the folder where you will store your documentation
mkdir docs
Create the index.yml
file with some OPENAPI
or Swagger
specifications
touch docs/index.yml
Serve your documentation files
urlpatterns += static('/docs/', document_root='docs')
Add SWAGGER_YAML_FILENAME
setting to your settings.py
SWAGGER_YAML_FILENAME = '/docs/index.yml'
Add the SwaggerUIView
to your urls
from swagger_render.views import SwaggerUIView
urlpatterns = [
...
path('swagger/', SwaggerUIView.as_view()),
]
Voila!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-swagger-render-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77e7f284128cc00d9e217481c7d1d606a9bc523e836e1e992247478725f8aab9 |
|
MD5 | f1d7436ead6298228e0f757c637ce96f |
|
BLAKE2b-256 | 734beac667ca903853dc194a5415af5510e8d4d99561114617c6a1ba183f6e14 |
Close
Hashes for django_swagger_render-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5da8c3dfa43a5754516fdf259f056373df55803e43f9b572a3fe6e3d4d212d69 |
|
MD5 | c9bfcad8966a61592c4ecdb6eccfb596 |
|
BLAKE2b-256 | fda0dbf06aafc0c7a7aeff0b2ea96b9ec96a9d3f7586f42dfbbb69419a2622ef |