summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/test/testapi/opnfv_testapi/tornado_swagger/handlers.py10
-rw-r--r--utils/test/testapi/opnfv_testapi/tornado_swagger/settings.py4
-rw-r--r--utils/test/testapi/opnfv_testapi/tornado_swagger/views.py7
3 files changed, 11 insertions, 10 deletions
diff --git a/utils/test/testapi/opnfv_testapi/tornado_swagger/handlers.py b/utils/test/testapi/opnfv_testapi/tornado_swagger/handlers.py
index 2154b4697..af0b515ad 100644
--- a/utils/test/testapi/opnfv_testapi/tornado_swagger/handlers.py
+++ b/utils/test/testapi/opnfv_testapi/tornado_swagger/handlers.py
@@ -9,7 +9,7 @@
from tornado.web import URLSpec, StaticFileHandler
from settings import default_settings, \
- SWAGGER_API_DOCS, SWAGGER_API_LIST, SWAGGER_API_SPEC
+ SWAGGER_API_DOCS, SWAGGER_RESOURCE_LISTING, SWAGGER_API_DECLARATION
from views import SwaggerUIHandler, SwaggerResourcesHandler, SwaggerApiHandler
@@ -27,15 +27,15 @@ def swagger_handlers():
default_settings,
name=SWAGGER_API_DOCS),
URLSpec(
- _path(r'spec.json$'),
+ _path(r'resources.json$'),
SwaggerResourcesHandler,
default_settings,
- name=SWAGGER_API_LIST),
+ name=SWAGGER_RESOURCE_LISTING),
URLSpec(
- _path(r'spec$'),
+ _path(r'APIs$'),
SwaggerApiHandler,
default_settings,
- name=SWAGGER_API_SPEC),
+ name=SWAGGER_API_DECLARATION),
(
_path(r'(.*\.(css|png|gif|js))'),
StaticFileHandler,
diff --git a/utils/test/testapi/opnfv_testapi/tornado_swagger/settings.py b/utils/test/testapi/opnfv_testapi/tornado_swagger/settings.py
index 88d0d0f88..753029709 100644
--- a/utils/test/testapi/opnfv_testapi/tornado_swagger/settings.py
+++ b/utils/test/testapi/opnfv_testapi/tornado_swagger/settings.py
@@ -10,8 +10,8 @@ import os.path
SWAGGER_VERSION = '1.2'
SWAGGER_API_DOCS = 'swagger-api-docs'
-SWAGGER_API_LIST = 'swagger-api-list'
-SWAGGER_API_SPEC = 'swagger-api-spec'
+SWAGGER_RESOURCE_LISTING = 'swagger-resource-listing'
+SWAGGER_API_DECLARATION = 'swagger-api-declaration'
STATIC_PATH = os.path.join(os.path.dirname(os.path.normpath(__file__)),
'static')
diff --git a/utils/test/testapi/opnfv_testapi/tornado_swagger/views.py b/utils/test/testapi/opnfv_testapi/tornado_swagger/views.py
index 25083195b..2168c5e91 100644
--- a/utils/test/testapi/opnfv_testapi/tornado_swagger/views.py
+++ b/utils/test/testapi/opnfv_testapi/tornado_swagger/views.py
@@ -12,7 +12,8 @@ import json
import tornado.template
import tornado.web
-from settings import SWAGGER_VERSION, SWAGGER_API_LIST, SWAGGER_API_SPEC
+from settings import SWAGGER_VERSION
+from settings import SWAGGER_RESOURCE_LISTING, SWAGGER_API_DECLARATION
from settings import models, basePath
@@ -29,7 +30,7 @@ class SwaggerUIHandler(tornado.web.RequestHandler):
return self.static_path
def get(self):
- discovery_url = basePath() + self.reverse_url(SWAGGER_API_LIST)
+ discovery_url = basePath() + self.reverse_url(SWAGGER_RESOURCE_LISTING)
self.render('index.html', discovery_url=discovery_url)
@@ -47,7 +48,7 @@ class SwaggerResourcesHandler(tornado.web.RequestHandler):
'produces': ["application/json"],
'description': 'Test Api Spec',
'apis': [{
- 'path': self.reverse_url(SWAGGER_API_SPEC),
+ 'path': self.reverse_url(SWAGGER_API_DECLARATION),
'description': 'Test Api Spec'
}]
}