mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Merge branch 'dev' of https://github.com/Dispatcharr/Dispatcharr into vod-relationtest
This commit is contained in:
commit
fa2b3fbe3e
2 changed files with 4 additions and 9 deletions
|
|
@ -1,11 +1,10 @@
|
||||||
from django.urls import path, include
|
from django.urls import path, include, re_path
|
||||||
from drf_yasg.views import get_schema_view
|
from drf_yasg.views import get_schema_view
|
||||||
from drf_yasg import openapi
|
from drf_yasg import openapi
|
||||||
from rest_framework.permissions import AllowAny
|
from rest_framework.permissions import AllowAny
|
||||||
|
|
||||||
app_name = 'api'
|
app_name = 'api'
|
||||||
|
|
||||||
# Configure Swagger Schema
|
|
||||||
schema_view = get_schema_view(
|
schema_view = get_schema_view(
|
||||||
openapi.Info(
|
openapi.Info(
|
||||||
title="Dispatcharr API",
|
title="Dispatcharr API",
|
||||||
|
|
@ -35,7 +34,7 @@ urlpatterns = [
|
||||||
|
|
||||||
|
|
||||||
# Swagger Documentation api_urls
|
# Swagger Documentation api_urls
|
||||||
path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
re_path(r'^swagger/?$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
||||||
path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
||||||
path('swagger.json', schema_view.without_ui(cache_timeout=0), name='schema-json'),
|
path('swagger.json', schema_view.without_ui(cache_timeout=0), name='schema-json'),
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -67,12 +67,8 @@ urlpatterns = [
|
||||||
xc_series_stream,
|
xc_series_stream,
|
||||||
name="xc_series_stream",
|
name="xc_series_stream",
|
||||||
),
|
),
|
||||||
# Swagger UI
|
|
||||||
path(
|
re_path(r"^swagger/?$", schema_view.with_ui("swagger", cache_timeout=0), name="schema-swagger-ui"),
|
||||||
"swagger/",
|
|
||||||
schema_view.with_ui("swagger", cache_timeout=0),
|
|
||||||
name="schema-swagger-ui",
|
|
||||||
),
|
|
||||||
# ReDoc UI
|
# ReDoc UI
|
||||||
path("redoc/", schema_view.with_ui("redoc", cache_timeout=0), name="schema-redoc"),
|
path("redoc/", schema_view.with_ui("redoc", cache_timeout=0), name="schema-redoc"),
|
||||||
# Optionally, serve the raw Swagger JSON
|
# Optionally, serve the raw Swagger JSON
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue