diff options
Diffstat (limited to 'example_project/settings.py')
-rw-r--r-- | example_project/settings.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/example_project/settings.py b/example_project/settings.py index 709fce8ea..10e82aeee 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -308,6 +308,18 @@ JOINT = " | " # not managed cautiously the dir contening these scripts is not set by default ISHTAR_SCRIPT_DIR = "" +# Open API schema configuration +ISHTAR_OPENAPI = False # allow to generate OpenAPI schema - usefull only for Ishtar editor +REST_FRAMEWORK = { + # YOUR SETTINGS + 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema', +} +SPECTACULAR_SETTINGS = { + 'TITLE': 'Ishtar API', + 'VERSION': get_version(), + 'SERVE_INCLUDE_SCHEMA': False, +} + # GDPR GDPR_LOGGING = False GDPR_RETENTION_PERIOD = int(30.5 * 6) + 1 # ~ 6 month of logging @@ -367,6 +379,10 @@ except ImportError: if USE_TRANSLATION_OVERLOAD: INSTALLED_APPS.insert(0, "overload_translation") +if ISHTAR_OPENAPI: + INSTALLED_APPS.append("drf_spectacular") + + if "SECRET_KEY" not in globals(): # explicit import from the root for celery current_path = os.path.abspath(__file__) current_dir_path = os.path.dirname(current_path).split(os.sep)[-1] |