Metadata-Version: 2.1
Name: rest-swagger
Version: 0.1.0
Summary: Implementation of Swagger UI for Django Rest Framework
Home-page: https://github.com/AjibsBaba/rest-swagger
Author: Samuel Ajibade
Author-email: samuelajibade22@gmail.com
License: LICENSE
Keywords: rest_swagger rest-swagger rest swagger djangorestframework documentation
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: OS Independent
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.0
Classifier: Framework :: Django :: 2.0
Classifier: Framework :: Django :: 2.1
Classifier: Framework :: Django :: 2.2
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Code Generators
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: coreapi (>=2.3.3)
Requires-Dist: openapi-codec (>=1.3.2)
Requires-Dist: djangorestframework (>=3.12.1)
Requires-Dist: Django (>=3.1.1)
Requires-Dist: simplejson (>=3.17.2)

# Rest-Swagger


---

[![build-status-badge]][build-status]
[![pypi-version]][pypi]





#### An API documentation generator for Swagger UI and Django REST Framework

Full documentation: http://AjibsBaba.github.io/rest-swagger/


## Installation

1. `pip install rest-swagger`

2. Add `rest_swagger` to your `INSTALLED_APPS` setting:

    ```python
        INSTALLED_APPS = (
            ...
            'rest_swagger',
        )
    ```

## Rendering Swagger Specification and Documentation

This package ships with two renderer classes:

1. `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
2. `SwaggerUIRenderer` generates the Swagger UI and requires the `OpenAPIRenderer`


### Quick Start Example:
```python
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!


