2022-04-04 14:38:50 +02:00
|
|
|
"""
|
|
|
|
URL Configuration
|
|
|
|
|
|
|
|
For more information on this file, see
|
|
|
|
https://docs.djangoproject.com/en/3.2/topics/http/urls/
|
|
|
|
"""
|
2024-02-02 20:24:25 +01:00
|
|
|
|
2020-01-30 14:47:36 +01:00
|
|
|
from django.urls import include, path
|
2021-10-16 20:34:03 +02:00
|
|
|
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
2020-01-30 14:47:36 +01:00
|
|
|
|
2022-07-19 18:38:17 +02:00
|
|
|
from .core.router import urls as core_urls
|
|
|
|
from .history.router import urls as history_urls
|
|
|
|
from .podcasts.router import urls as podcasts_urls
|
|
|
|
from .schedule.router import urls as schedule_urls
|
|
|
|
from .storage.router import urls as storage_urls
|
2020-01-30 14:47:36 +01:00
|
|
|
|
2022-07-19 18:38:17 +02:00
|
|
|
api_urls = []
|
|
|
|
api_urls += core_urls
|
|
|
|
api_urls += history_urls
|
|
|
|
api_urls += podcasts_urls
|
|
|
|
api_urls += schedule_urls
|
|
|
|
api_urls += storage_urls
|
2022-04-04 14:38:50 +02:00
|
|
|
|
2020-01-30 14:47:36 +01:00
|
|
|
|
|
|
|
urlpatterns = [
|
2022-09-06 21:30:43 +02:00
|
|
|
path("api/browser/", include("rest_framework.urls", namespace="rest_framework")),
|
2022-07-19 18:38:17 +02:00
|
|
|
path("api/v2/", include(api_urls)),
|
2022-04-04 14:38:50 +02:00
|
|
|
path(
|
2022-07-22 17:34:09 +02:00
|
|
|
"api/v2/schema",
|
2022-04-04 14:38:50 +02:00
|
|
|
SpectacularAPIView.as_view(),
|
|
|
|
name="schema",
|
|
|
|
),
|
2021-10-16 20:34:03 +02:00
|
|
|
path(
|
2022-07-22 17:34:09 +02:00
|
|
|
"api/v2/schema/swagger-ui",
|
2021-10-16 20:34:03 +02:00
|
|
|
SpectacularSwaggerView.as_view(url_name="schema"),
|
|
|
|
name="swagger-ui",
|
|
|
|
),
|
2020-01-30 14:47:36 +01:00
|
|
|
]
|