after fork
This commit is contained in:
17
templates/redoc.html
Normal file
17
templates/redoc.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ .title }} - ReDoc</title>
|
||||
<meta charset="utf-8"/>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="redoc"></div>
|
||||
<script>
|
||||
let options = JSON.parse('{{ .redoc_options }}')
|
||||
Redoc.init('{{ .openapi_url }}', options, document.getElementById('redoc'))
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
24
templates/swagger.html
Normal file
24
templates/swagger.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ .title }} - Swagger UI</title>
|
||||
<link href="https://unpkg.com/swagger-ui-dist@3/swagger-ui.css" rel="stylesheet" type="text/css">
|
||||
<script charset="UTF-8" src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="swagger-ui"></div>
|
||||
<script>
|
||||
let options = JSON.parse('{{ .swagger_options }}')
|
||||
const ui = SwaggerUIBundle({
|
||||
url: "{{ .openapi_url }}",
|
||||
dom_id: '#swagger-ui',
|
||||
presets: [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
],
|
||||
persistAuthorization: true,
|
||||
...options
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user