Skip to content

Commit af97818

Browse files
committed
fix: schema API를 prod에서도 노출되도록 수정
1 parent 10a3f6a commit af97818

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/core/urls.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@
4040
path("admin/", admin.site.urls),
4141
# V1 API
4242
re_path("^v1/", include((v1_apis, "v1"), namespace="v1")),
43-
] + [
43+
# API Docs
44+
path("api/schema/v1/", SpectacularAPIView.as_view(api_version="v1"), name="v1-schema"),
4445
# Static files
4546
*static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
4647
*static(settings.STATIC_URL, document_root=settings.STATIC_ROOT),
4748
]
4849

4950
if settings.DEBUG:
5051
urlpatterns += [
51-
# API Docs
52-
path("api/schema/v1/", SpectacularAPIView.as_view(api_version="v1"), name="v1-schema"),
5352
path("api/schema/v1/swagger/", SpectacularSwaggerView.as_view(url_name="v1-schema"), name="swagger-v1-ui"),
5453
]

0 commit comments

Comments
 (0)