From 4e640b8d082843f9f44b355ab63b0c77595ed17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Tue, 19 Sep 2023 17:34:04 -0300 Subject: [PATCH] =?UTF-8?q?Redirects=20para=20documenta=C3=A7=C3=A3o=20da?= =?UTF-8?q?=20API=20rest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/urls.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sigi/urls.py b/sigi/urls.py index 680498b..03b0500 100644 --- a/sigi/urls.py +++ b/sigi/urls.py @@ -18,7 +18,7 @@ from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include -from django.views.generic import TemplateView +from django.views.generic import TemplateView, RedirectView urlpatterns = [ path("casas/", include("sigi.apps.casas.urls")), @@ -30,11 +30,19 @@ urlpatterns = [ path("admin/convenios/", include("sigi.apps.convenios.urls")), path("admin/ocorrencias/", include("sigi.apps.ocorrencias.admin_urls")), path("admin/", admin.site.urls), + path( + "api/", + RedirectView.as_view(pattern_name="swagger-ui", permanent=False), + ), + path( + "api/doc/", + RedirectView.as_view(pattern_name="swagger-ui", permanent=False), + ), path( "api/doc/schema.yaml", get_schema_view( - title="SIGI Open API Schema", - description="API for SIGI opendata", + title="SIGI rest API Schema", + description="REST API for SIGI opendata", version="1.0.0", ), name="openapi-schema",