aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-04-13 11:12:49 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-04-13 11:12:49 +0800
commit1b499d0c61ac9c98cee086e3a6ea15e3af0d7818 (patch)
tree2d9376364d1a271cb2a4a7949e9f7fd9ff1fbdc0
parentc2ed095baadb1e6f95055d0ab95138d017824efe (diff)
Fix vfc-nslcm auto swagger url
Change-Id: If6c778535bc869e52fa880fc42b848aadc12acb0 Issue-ID: VFC-878 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--lcm/swagger/urls.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/lcm/swagger/urls.py b/lcm/swagger/urls.py
index 7536eda1..47a1cc2c 100644
--- a/lcm/swagger/urls.py
+++ b/lcm/swagger/urls.py
@@ -16,16 +16,15 @@ from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import permissions
-from lcm.swagger.views import SwaggerJsonView
-
swagger_info = openapi.Info(
title="vfc-nfvo-lcm API",
default_version='v1',
description="""
-The `swagger-ui` view can be found [here](/cached/swagger).
-The `ReDoc` view can be found [here](/cached/redoc).
-The swagger YAML document can be found [here](/cached/swagger.yaml)."""
+The `swagger-ui` view can be found [here](/api/nslcm/v1/swagger).
+The `ReDoc` view can be found [here](/api/nslcm/v1/redoc).
+The swagger YAML document can be found [here](/api/nslcm/v1/swagger.json).
+The swagger YAML document can be found [here](/api/nslcm/v1/swagger.yaml)."""
)
SchemaView = get_schema_view(
@@ -35,8 +34,8 @@ SchemaView = get_schema_view(
)
urlpatterns = [
- url(r'^api/nslcm/v1/swagger.json$', SwaggerJsonView.as_view()),
- url(r'^swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=0), name='schema-json'),
- url(r'^swagger/$', SchemaView.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
- url(r'^redoc/$', SchemaView.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
+ # url(r'^api/nslcm/v1/swagger.json$', SwaggerJsonView.as_view()),
+ url(r'^api/nslcm/v1/swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=0), name='schema-json'),
+ url(r'^api/nslcm/v1/swagger$', SchemaView.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
+ url(r'^api/nslcm/v1/redoc$', SchemaView.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
]