Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

swaggerupdate #296

Merged
merged 1 commit into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10,635 changes: 10,634 additions & 1 deletion swagger.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion webapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def safe_execute(default, exception, function, *args):
MIDDLEWARE.append('dongtai_agent_python.middlewares.django_middleware.FireMiddleware')
if os.getenv('environment', None) == 'TEST' or os.getenv('SAVEEYE', None) == 'TRUE':
CAPTCHA_NOISE_FUNCTIONS = ('captcha.helpers.noise_null',)
if os.getenv('environment', 'PROD') in ('TEST', 'DOC'):
if os.getenv('environment', 'PROD') in ('TEST', 'DOC') or os.getenv('DOC', None) == 'TRUE':
from django.utils.translation import gettext_lazy as _
INSTALLED_APPS.append('drf_spectacular')
SPECTACULAR_SETTINGS = {
Expand Down
2 changes: 1 addition & 1 deletion webapi/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if os.getenv('environment', 'PROD') in ('TEST', 'DOC'):
if os.getenv('environment', 'PROD') in ('TEST', 'DOC') or os.getenv('DOC', None) == 'TRUE':
from drf_spectacular.views import SpectacularJSONAPIView, SpectacularRedocView, SpectacularSwaggerView
urlpatterns.extend([
path('api/XZPcGFKoxYXScwGjQtJx8u/schema/',
Expand Down