“Swagger Django” Kode Jawaban

Perpustakaan Swagger untuk 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

Jawaban yang mirip dengan “Swagger Django”

Pertanyaan yang mirip dengan “Swagger Django”

Lebih banyak jawaban terkait untuk “Swagger Django” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya