Swagger endpoint can now be accessed with or without a trailing slash.

This commit is contained in:
SergeantPanda 2025-08-19 18:16:21 -05:00
parent 750bf90576
commit e12ce4e596
2 changed files with 3 additions and 9 deletions

View file

@ -55,12 +55,7 @@ urlpatterns = [
stream_xc,
name="xc_stream_endpoint",
),
# Swagger UI
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"),
# ReDoc UI
path("redoc/", schema_view.with_ui("redoc", cache_timeout=0), name="schema-redoc"),
# Optionally, serve the raw Swagger JSON