Add drf-yasg

* Install drf-yasg

* Add drf-yasg settings and urls

* Pin drf to make drf-yasg work

* Adjust config-models version to be compatible

* Remove django-rest-swagger (the old way)
This commit is contained in:
Ned Batchelder
2019-04-24 15:46:50 -04:00
parent 14f7b90fb8
commit 2e9cae46cb
8 changed files with 43 additions and 11 deletions

View File

@@ -2150,6 +2150,7 @@ INSTALLED_APPS = [
# User API
'rest_framework',
'openedx.core.djangoapps.user_api',
# Shopping cart
@@ -2301,7 +2302,7 @@ INSTALLED_APPS = [
'django_filters',
# API Documentation
'rest_framework_swagger',
'drf_yasg',
# edx-drf-extensions
'csrf.apps.CsrfAppConfig', # Enables frontend apps to retrieve CSRF tokens.
@@ -2331,6 +2332,9 @@ REST_FRAMEWORK = {
},
}
SWAGGER_SETTINGS = {
'DEFAULT_INFO': 'openedx.core.openapi.openapi_info',
}
######################### MARKETING SITE ###############################
EDXMKTG_LOGGED_IN_COOKIE_NAME = 'edxloggedin'