'rest_framework',
'lcm.pub.database',
'lcm.samples',
- 'lcm.swagger'
+ 'lcm.swagger',
+ 'drf_yasg'
]
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'context_processors': [
+ 'django.template.context_processors.debug',
+ 'django.template.context_processors.request',
+ 'django.contrib.auth.context_processors.auth',
+ 'django.contrib.messages.context_processors.messages',
+ ],
+ },
+ },
+]
+
+SWAGGER_SETTINGS = {
+ 'LOGIN_URL': '/admin/login',
+ 'LOGOUT_URL': '/admin/logout',
+ 'DEFAULT_INFO': 'lcm.urls.swagger_info'
+}
+
MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
# limitations under the License.
from django.conf.urls import include, url
+from drf_yasg import openapi
+
from lcm.pub.config.config import REG_TO_MSB_WHEN_START, REG_TO_MSB_REG_URL, REG_TO_MSB_REG_PARAM
from lcm.pub.config.config import DEPLOY_WORKFLOW_WHEN_START
+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)."""
+)
+
urlpatterns = [
url(r'^', include('lcm.samples.urls')),
url(r'^', include('lcm.packages.urls')),