Skip to content

terasaka2k/django-rest-swagger

 
 

Repository files navigation

Django REST Swagger

build-status-badge pypi-version license-badge docs-badge

####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

  1. pip install django-rest-swagger

  2. Add rest_framework_swagger to your INSTALLED_APPS setting:

        INSTALLED_APPS = (
            ...
            'rest_framework_swagger',
        )
  3. Include the rest_framework_swagger URLs to a path of your choice

    patterns = ('',
        ...
        url(r'^docs/', include('rest_framework_swagger.urls')),
    )

Requirements

  • Python (2.6.5+, 2.7, 3.2, 3.3, 3.4)
  • Django (1.5.5+, 1.6, 1.7)
  • Django REST framework (2.3.8+)

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)

About

Swagger Documentation Generator for Django REST Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 56.7%
  • Python 34.3%
  • CSS 7.5%
  • HTML 1.5%