Browse Source

add link para OpenAPI no rodapé

pull/3446/head
Leandro Roberto 3 years ago
parent
commit
84db38acc5
  1. 5
      sapl/api/urls.py
  2. 4
      sapl/templates/base.html

5
sapl/api/urls.py

@ -32,12 +32,11 @@ urlpatterns_router = router.urls
urlpatterns_api_doc = [ urlpatterns_api_doc = [
# Optional UI: # Optional UI:
url('^schema/swagger-ui/', url('^schema/swagger-ui/',
SpectacularSwaggerView.as_view(url_name='sapl.api:schema_api'), name='swagger-ui'), SpectacularSwaggerView.as_view(url_name='sapl.api:schema_api'), name='swagger_ui_schema_api'),
url('^schema/redoc/', url('^schema/redoc/',
SpectacularRedocView.as_view(url_name='sapl.api:schema_api'), name='redoc'), SpectacularRedocView.as_view(url_name='sapl.api:schema_api'), name='redoc_schema_api'),
# YOUR PATTERNS # YOUR PATTERNS
url('^schema/', SpectacularAPIView.as_view(), name='schema_api'), url('^schema/', SpectacularAPIView.as_view(), name='schema_api'),
] ]
"""if 'drf_yasg' in settings.INSTALLED_APPS: """if 'drf_yasg' in settings.INSTALLED_APPS:
from drf_yasg import openapi from drf_yasg import openapi

4
sapl/templates/base.html

@ -196,6 +196,7 @@
</small> </small>
<span>Release: 3.1.162-RC10</span> <span>Release: 3.1.162-RC10</span>
</p> </p>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<a class="footer__logo" href="#"> <a class="footer__logo" href="#">
@ -218,9 +219,12 @@
<span class="street-address">{{ endereco }}</span> <span class="street-address">{{ endereco }}</span>
<br> CEP: <span class="postal-code">{{ cep }}</span> | Telefone: <span>{{ telefone }}</span> <br> CEP: <span class="postal-code">{{ cep }}</span> | Telefone: <span>{{ telefone }}</span>
<br> <br>
<small><a href="{% url 'sapl.api:swagger_ui_schema_api' %}">{% trans 'OpenAPI' %}</a></small> |
<a href="{{endereco_web}}" class="url">{% trans 'Site' %}</a> | <a href="{{endereco_web}}" class="url">{% trans 'Site' %}</a> |
<a href="mailto:{{email}}" class="email">{% trans 'Fale Conosco' %}</a> <a href="mailto:{{email}}" class="email">{% trans 'Fale Conosco' %}</a>
</small> </small>
</address> </address>
{% else %} {% else %}

Loading…
Cancel
Save