Skip to content

Commit

Permalink
Issue galaxyproject#109: Add django-rest-swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
machristie committed Nov 2, 2017
1 parent 65aaf6e commit b9db30f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions django-cloudlaunch/cloudlaunch/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""
from django.conf.urls import include
from django.conf.urls import url
from rest_framework_swagger.views import get_swagger_view

from . import views

Expand Down Expand Up @@ -45,6 +46,9 @@
infrastructure_regex_pattern = r'api/v1/infrastructure/'
auth_regex_pattern = r'api/v1/auth/'
public_services_regex_pattern = r'api/v1/public_services/'

schema_view = get_swagger_view(title='CloudLaunch API')

urlpatterns = [
url(r'api/v1/', include(router.urls)),
url(r'api/v1/', include(deployments_router.urls)),
Expand All @@ -63,4 +67,6 @@
url(r'accounts/', include('allauth.urls')),
# Public services
url(public_services_regex_pattern, include('public_appliances.urls')),
# OpenAPI schema view
url(r'api/v1/schema/$', schema_view),
]
3 changes: 2 additions & 1 deletion django-cloudlaunch/cloudlaunchserver/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
'django_celery_results',
'django_celery_beat',
'django_countries',
'django_filters'
'django_filters',
'rest_framework_swagger',
]

MIDDLEWARE_CLASSES = [
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ djangorestframework==3.6.4
django-rest-auth==0.9.1 # login support for DRF through restful endpoints
django-allauth>=0.24.1 # pluggable social auth for django login
drf-nested-routers>=0.11.1 # Provides nested routing for DRF
django-rest-swagger==2.1.2 # Provides OpenAPI/Swagger schema generation

# Cloudbridge
git+git://github.com/gvlproject/cloudbridge
Expand Down

0 comments on commit b9db30f

Please sign in to comment.