mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 01:26:57 +03:00
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:
parent
7d032d7303
commit
94269f8c7f
|
@ -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' %}
|
||||
|
|
|
@ -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/",
|
||||
|
|
Loading…
Reference in New Issue
Block a user