mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-04-27 20:03:46 +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 }}",
|
"DESCRIPTION": "Documentation of API endpoints of {{ cookiecutter.project_name }}",
|
||||||
"VERSION": "1.0.0",
|
"VERSION": "1.0.0",
|
||||||
"SERVE_PERMISSIONS": ["rest_framework.permissions.IsAdminUser"],
|
"SERVE_PERMISSIONS": ["rest_framework.permissions.IsAdminUser"],
|
||||||
|
"SCHEMA_PATH_PREFIX": "/api/",
|
||||||
}
|
}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.frontend_pipeline == 'Webpack' %}
|
{%- if cookiecutter.frontend_pipeline == 'Webpack' %}
|
||||||
|
|
|
@ -43,7 +43,7 @@ urlpatterns += [
|
||||||
# API base url
|
# API base url
|
||||||
path("api/", include("config.api_router")),
|
path("api/", include("config.api_router")),
|
||||||
# DRF auth token
|
# 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/schema/", SpectacularAPIView.as_view(), name="api-schema"),
|
||||||
path(
|
path(
|
||||||
"api/docs/",
|
"api/docs/",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user