1 ##############################################################################
2 # Copyright (c) 2016 ZTE Corporation
3 # feng.xiaowei@zte.com.cn
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 from opnfv_testapi.tornado_swagger import settings
12 from opnfv_testapi.tornado_swagger import views
15 def swagger_handlers():
16 prefix = settings.docs_settings.get('swagger_prefix', '/swagger')
21 return prefix + suffix
25 views.SwaggerUIHandler,
26 settings.docs_settings,
27 name=settings.API_DOCS_NAME),
29 _path(r'resources.json$'),
30 views.SwaggerResourcesHandler,
31 settings.docs_settings,
32 name=settings.RESOURCE_LISTING_NAME),
35 views.SwaggerApiHandler,
36 settings.docs_settings,
37 name=settings.API_DECLARATION_NAME),