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

Commit

Permalink
Merge pull request #296 from Bidaya0/swaggerupdate
Browse files Browse the repository at this point in the history
swaggerupdate
  • Loading branch information
Bidaya0 authored Dec 3, 2021
2 parents 0cddf9e + 1fac87e commit 0831229
Show file tree
Hide file tree
Showing 3 changed files with 10,636 additions and 3 deletions.
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

0 comments on commit 0831229

Please sign in to comment.