aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-04-13 10:37:30 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-04-13 10:45:50 +0800
commit0f456e5c4dec5fd66fc0f4a773043dd74ef789d0 (patch)
tree517b00602e754e6e9ef01ac9db4f5ba017549d4d
parent3e700e58c66468b63ced3bd69cb3c98f0367e05d (diff)
Fix vfc-catalog auto swagger url
Change-Id: I44bd754174b68e479bb5170a8beb1c4c21d70c12 Issue-ID: VFC-877 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--catalog/swagger/urls.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/catalog/swagger/urls.py b/catalog/swagger/urls.py
index 146cb040..5437ee5a 100644
--- a/catalog/swagger/urls.py
+++ b/catalog/swagger/urls.py
@@ -17,18 +17,16 @@ from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import permissions
-from catalog.swagger.views import SwaggerJsonView
-
# Add code for generating swagger automatically.
swagger_info = openapi.Info(
title="VFC Catalog API",
default_version='v1',
description="""
-The `swagger-ui` view can be found [here](/api/vnflcm/v1/swagger).
-The `ReDoc` view can be found [here](/api/vnflcm/v1/redoc).
-The swagger YAML document can be found [here](/api/vnflcm/v1/swagger.yaml).
-The swagger JSON document can be found [here](/api/vnflcm/v1/swagger.json)."""
+The `swagger-ui` view can be found [here](/api/catalog/v1/swagger).
+The `ReDoc` view can be found [here](/api/catalog/v1/redoc).
+The swagger YAML document can be found [here](/api/catalog/v1/swagger.yaml).
+The swagger JSON document can be found [here](/api/catalog/v1/swagger.json)."""
)
SchemaView = get_schema_view(
@@ -38,8 +36,8 @@ SchemaView = get_schema_view(
)
urlpatterns = [
- url(r'^api/catalog/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/catalog/v1/swagger.json$', SwaggerJsonView.as_view()),
+ url(r'^api/catalog/v1/swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=0), name='schema-json'),
+ url(r'^api/catalog/v1/swagger$', SchemaView.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
+ url(r'^api/catalog/v1/redoc$', SchemaView.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
]