Browse Source

Redirects para documentação da API rest

pull/166/head
Sesóstris Vieira 1 year ago
parent
commit
4e640b8d08
  1. 14
      sigi/urls.py

14
sigi/urls.py

@ -18,7 +18,7 @@ from django.conf import settings
from django.conf.urls.static import static from django.conf.urls.static import static
from django.contrib import admin from django.contrib import admin
from django.urls import path, include from django.urls import path, include
from django.views.generic import TemplateView from django.views.generic import TemplateView, RedirectView
urlpatterns = [ urlpatterns = [
path("casas/", include("sigi.apps.casas.urls")), path("casas/", include("sigi.apps.casas.urls")),
@ -30,11 +30,19 @@ urlpatterns = [
path("admin/convenios/", include("sigi.apps.convenios.urls")), path("admin/convenios/", include("sigi.apps.convenios.urls")),
path("admin/ocorrencias/", include("sigi.apps.ocorrencias.admin_urls")), path("admin/ocorrencias/", include("sigi.apps.ocorrencias.admin_urls")),
path("admin/", admin.site.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( path(
"api/doc/schema.yaml", "api/doc/schema.yaml",
get_schema_view( get_schema_view(
title="SIGI Open API Schema", title="SIGI rest API Schema",
description="API for SIGI opendata", description="REST API for SIGI opendata",
version="1.0.0", version="1.0.0",
), ),
name="openapi-schema", name="openapi-schema",

Loading…
Cancel
Save