diff --git a/rest_framework_swagger/renderers.py b/rest_framework_swagger/renderers.py index 61768f2a..de605c67 100644 --- a/rest_framework_swagger/renderers.py +++ b/rest_framework_swagger/renderers.py @@ -41,6 +41,9 @@ def get_customizations(self): data = {} if swagger_settings.SECURITY_DEFINITIONS: data['securityDefinitions'] = swagger_settings.SECURITY_DEFINITIONS + + if swagger_settings.INFO: + data['info'] = swagger_settings.INFO return data diff --git a/rest_framework_swagger/settings.py b/rest_framework_swagger/settings.py index c4a5dbd5..90737d65 100644 --- a/rest_framework_swagger/settings.py +++ b/rest_framework_swagger/settings.py @@ -10,6 +10,15 @@ 'type': 'basic' } }, + 'INFO': { + 'contact': 'your@email.com', + 'description': 'This is a sample API Description', + 'license': 'Apache 2.0', + 'licenseUrl': 'http://www.apache.org/licenses/LICENSE-2.0.html', + 'termsOfServiceUrl': 'http://helloreverb.com/terms/', + 'title': 'Swagger Sample App', + 'version': '0.0', + }, 'LOGIN_URL': getattr(settings, 'LOGIN_URL', None), 'LOGOUT_URL': getattr(settings, 'LOGOUT_URL', None), 'DOC_EXPANSION': None,