diff options
author | Fu Jinhua <fu.jinhua@zte.com.cn> | 2018-04-13 03:46:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-04-13 03:46:22 +0000 |
commit | ca48d57c0335c1797eff522d7db672643e4919cd (patch) | |
tree | d8bbd1923c0a1703382d0d5e09bac72a25b13811 | |
parent | 00a265fba0125840da123086588fa098ec06428d (diff) | |
parent | 1b499d0c61ac9c98cee086e3a6ea15e3af0d7818 (diff) |
Merge "Fix vfc-nslcm auto swagger url"
-rw-r--r-- | lcm/swagger/urls.py | 17 |
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'), ] |