diff options
-rw-r--r-- | res/res/swagger/tests.py | 2 | ||||
-rw-r--r-- | res/res/swagger/urls.py | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/res/res/swagger/tests.py b/res/res/swagger/tests.py index 01eae5a..03bb77f 100644 --- a/res/res/swagger/tests.py +++ b/res/res/swagger/tests.py @@ -25,5 +25,5 @@ class SwaggerViewTest(unittest.TestCase): pass def test_swagger_ok(self): - resp = self.client.get("/swagger.json", format="json") + resp = self.client.get("/api/vnfres/v1/swagger.json", format="json") self.assertEqual(resp.status_code, status.HTTP_200_OK, resp.content) diff --git a/res/res/swagger/urls.py b/res/res/swagger/urls.py index 0cc9043..290ba16 100644 --- a/res/res/swagger/urls.py +++ b/res/res/swagger/urls.py @@ -21,9 +21,9 @@ swagger_info = openapi.Info( 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/vnfres/v1/cached/swagger). +The `ReDoc` view can be found [here](/api/vnfres/v1/cached/redoc). +The swagger YAML document can be found [here](/api/vnfres/v1/cached/swagger.yaml).""" ) SchemaView = get_schema_view( @@ -34,10 +34,10 @@ SchemaView = get_schema_view( urlpatterns = [ # url(r'^api/vnfres/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'^cached/swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=None), name='cschema-json'), - url(r'^cached/swagger/$', SchemaView.with_ui('swagger', cache_timeout=None), name='cschema-swagger-ui'), - url(r'^cached/redoc/$', SchemaView.with_ui('redoc', cache_timeout=None), name='cschema-redoc'), + url(r'^api/vnfres/v1/swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=0), name='schema-json'), + url(r'^api/vnfres/v1/swagger/$', SchemaView.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), + url(r'^api/vnfres/v1/redoc/$', SchemaView.with_ui('redoc', cache_timeout=0), name='schema-redoc'), + url(r'^api/vnfres/v1/cached/swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=None), name='cschema-json'), + url(r'^api/vnfres/v1/cached/swagger/$', SchemaView.with_ui('swagger', cache_timeout=None), name='cschema-swagger-ui'), + url(r'^api/vnfres/v1/cached/redoc/$', SchemaView.with_ui('redoc', cache_timeout=None), name='cschema-redoc'), ] |