diff --git a/test_project/test_project/settings.py b/test_project/test_project/settings.py index bd94c34a7..29f83a8ff 100644 --- a/test_project/test_project/settings.py +++ b/test_project/test_project/settings.py @@ -63,6 +63,7 @@ INSTALLED_APPS = ( 'ckeditor_uploader', 'rest_framework', 'rest_framework.authtoken', + 'drf_spectacular', 'django_otp', 'django_otp.plugins.otp_totp', 'django_otp.plugins.otp_static', @@ -184,6 +185,13 @@ REST_FRAMEWORK = { 'rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.SessionAuthentication', ), + 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema', +} + +SPECTACULAR_SETTINGS = { + 'SCHEMA_PATH_PREFIX': r'/api/v1', + 'TITLE': 'Modoboa API', + 'VERSION': '1.0.0' } # Modoboa settings