Add a prefix setting so that swagger tags are generated in a readable way (#4975)

* feat: Add a prefix setting so that swagger tags are generated in a readable way

* feat: Change `auth-token` URLs
This commit is contained in:
JAEGYUN JUNG 2024-04-16 21:18:05 +09:00 committed by GitHub
parent 7d032d7303
commit 94269f8c7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -372,6 +372,7 @@ SPECTACULAR_SETTINGS = {
"DESCRIPTION": "Documentation of API endpoints of {{ cookiecutter.project_name }}",
"VERSION": "1.0.0",
"SERVE_PERMISSIONS": ["rest_framework.permissions.IsAdminUser"],
"SCHEMA_PATH_PREFIX": "/api/",
}
{%- endif %}
{%- if cookiecutter.frontend_pipeline == 'Webpack' %}

View File

@ -43,7 +43,7 @@ urlpatterns += [
# API base url
path("api/", include("config.api_router")),
# DRF auth token
path("auth-token/", obtain_auth_token),
path("api/auth-token/", obtain_auth_token),
path("api/schema/", SpectacularAPIView.as_view(), name="api-schema"),
path(
"api/docs/",