Django REST Swagger
####An API documentation generator for Swagger UI and Django REST Framework
This project is built on the Django REST Framework Docs and uses the lovely Swagger from Wordnik as an interface. This application introspectively generates documentation based on your Django REST Framework API code. Comments are generated in combination from code analysis and comment extraction. Here are some of the features that are documented:
- API title - taken from the class name
- Methods allowed
- Serializers & fields in use by a certain method
- Field default values, minimum, maximum, read-only and required attributes
- URL parameters (ie. /product/{id})
- Field
help_text
property is used to create the description from the serializer or model.
Quick start
-
pip install django-rest-swagger
-
Add
rest_framework_swagger
to yourINSTALLED_APPS
setting:INSTALLED_APPS = ( ... 'rest_framework_swagger', )
-
Include the rest_framework_swagger URLs to a path of your choice
patterns = ('', ... url(r'^docs/', include('rest_framework_swagger.urls')), )
for more information, see the documentation.
Requirements
- Python (2.6.5+, 2.7, 3.2, 3.3, 3.4)
- Django (1.5.5+, 1.6, 1.7, 1.8)
- Django REST framework (2.3.8+)
- PyYAML (3.10+)
Bugs & Contributions
Please report bugs by opening an issue
Contributions are welcome and are encouraged!
Special Thanks
Thanks to BNOTIONS for sponsoring initial development time.
Many thanks to Tom Christie & all the contributors who have developed Django REST Framework
Contributors
- Marc Gibbons (@marcgibbons)
- Geraldo Andrade (@quein)
- Vítek Pliska (@whit)
- Falk Schuetzenmeister (@postfalk)
- Lukas Hetzenecker (@lukas-hetzenecker)
- David Wolever (@wolever)
- Brian Moe (@bmoe)
- Ian Martin (@aztechian)
- @pzrq
- @jfelectron
- Warnar Boekkooi (@boekkooi)
- Darren Thompson (@WhiteDawn)
- Lukasz Balcerzak (@lukaszb)
- David Newgas (@davidn)
- Bozidar Benko (@bbenko)
- @pySilver
Django REST Framework Docs contributors:
- Scott Mountenay (@scottmx81)
- @swistakm
- Peter Baumgartner (@ipmb)
- Marlon Bailey (@avinash240)