“Swagger Django” Code-Antworten

Prahlerei Bibliothek für Django

pip install -U drf-yasg
babar abrar

Django Swagger

django swagger
--------------------------------------
https://drf-yasg.readthedocs.io/en/stable/
ASHABB

Swagger Django

[ Base URL: drf-yasg-demo.herokuapp.com/ ]
Ezel Bayraktar

Swagger Django

<!DOCTYPE html>
<html>
  <head>
    <title>Swagger</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="//unpkg.com/swagger-ui-dist@3/swagger-ui.css" />
  </head>
  <body>
    <div id="swagger-ui"></div>
    <script src="//unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
    <script>
    const ui = SwaggerUIBundle({
        url: "{% url schema_url %}",
        dom_id: '#swagger-ui',
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIBundle.SwaggerUIStandalonePreset
        ],
        layout: "BaseLayout",
        requestInterceptor: (request) => {
          request.headers['X-CSRFToken'] = "{{ csrf_token }}"
          return request;
        }
      })
    </script>
  </body>
</html>
inanpy

Ähnliche Antworten wie “Swagger Django”

Fragen ähnlich wie “Swagger Django”

Weitere verwandte Antworten zu “Swagger Django” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen