From: ying.yunlong Date: Thu, 25 Jan 2018 01:54:02 +0000 (+0800) Subject: Add vfc-vnflcm auto-swagger requirements X-Git-Tag: v1.1.0~83 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vfc%2Fgvnfm%2Fvnflcm.git;a=commitdiff_plain;h=adeb7c0268162c5dac043c5096c00bfd2f0c12f7 Add vfc-vnflcm auto-swagger requirements Change-Id: Id1c4b3266cc692b229df2a94cc92e603d5eb1d40 Issue-ID: VFC-682 Signed-off-by: ying.yunlong --- diff --git a/lcm/lcm/settings.py b/lcm/lcm/settings.py index f4b7826b..988740ea 100644 --- a/lcm/lcm/settings.py +++ b/lcm/lcm/settings.py @@ -45,7 +45,8 @@ INSTALLED_APPS = [ 'rest_framework', 'lcm.pub.database', 'lcm.samples', - 'lcm.swagger' + 'lcm.swagger', + 'drf_yasg', ] MIDDLEWARE_CLASSES = [ @@ -76,6 +77,23 @@ REST_FRAMEWORK = { ) } +# 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', + ], + }, + }, +] + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', diff --git a/lcm/requirements.txt b/lcm/requirements.txt index 740d0fe6..07ea5669 100644 --- a/lcm/requirements.txt +++ b/lcm/requirements.txt @@ -19,3 +19,8 @@ httplib2==0.9.2 coverage==4.2 mock==2.0.0 unittest_xml_reporting==1.12.0 + +# for auto-swagger +drf-yasg>=1.2.2 +flex>=6.11.1 +swagger-spec-validator>=2.1.0 \ No newline at end of file