mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-23 12:58:18 -05:00
Minimal configration for drf-spectacular
Onöy commandline interface
This commit is contained in:
parent
d7d3fed833
commit
5ea2700dc1
2
Pipfile
2
Pipfile
@ -59,7 +59,7 @@ watchdog = "~=6.0"
|
|||||||
whitenoise = "~=6.8"
|
whitenoise = "~=6.8"
|
||||||
whoosh = "~=2.7"
|
whoosh = "~=2.7"
|
||||||
zxing-cpp = {version = "*", platform_machine = "== 'x86_64'"}
|
zxing-cpp = {version = "*", platform_machine = "== 'x86_64'"}
|
||||||
|
drf-spectacular = "*"
|
||||||
|
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
# Linting
|
# Linting
|
||||||
|
@ -317,6 +317,7 @@ INSTALLED_APPS = [
|
|||||||
"allauth.account",
|
"allauth.account",
|
||||||
"allauth.socialaccount",
|
"allauth.socialaccount",
|
||||||
"allauth.mfa",
|
"allauth.mfa",
|
||||||
|
"drf_spectacular",
|
||||||
*env_apps,
|
*env_apps,
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -334,6 +335,7 @@ REST_FRAMEWORK = {
|
|||||||
# Make sure these are ordered and that the most recent version appears
|
# Make sure these are ordered and that the most recent version appears
|
||||||
# last
|
# last
|
||||||
"ALLOWED_VERSIONS": ["1", "2", "3", "4", "5"],
|
"ALLOWED_VERSIONS": ["1", "2", "3", "4", "5"],
|
||||||
|
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
|
||||||
}
|
}
|
||||||
|
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
@ -355,8 +357,13 @@ MIDDLEWARE = [
|
|||||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||||
"allauth.account.middleware.AccountMiddleware",
|
"allauth.account.middleware.AccountMiddleware",
|
||||||
]
|
]
|
||||||
|
SPECTACULAR_SETTINGS = {
|
||||||
# Optional to enable compression
|
"TITLE": "Paperless API",
|
||||||
|
"DESCRIPTION": "Generated with drf-spectacular (unmodified) python manage.py spectacular --color --file schema.yml",
|
||||||
|
"VERSION": "5.0.0",
|
||||||
|
"SERVE_INCLUDE_SCHEMA": False,
|
||||||
|
# OTHER SETTINGS
|
||||||
|
}# Optional to enable compression
|
||||||
if __get_boolean("PAPERLESS_ENABLE_COMPRESSION", "yes"): # pragma: no cover
|
if __get_boolean("PAPERLESS_ENABLE_COMPRESSION", "yes"): # pragma: no cover
|
||||||
MIDDLEWARE.insert(0, "compression_middleware.middleware.CompressionMiddleware")
|
MIDDLEWARE.insert(0, "compression_middleware.middleware.CompressionMiddleware")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user