Skip to content

Commit

Permalink
fix: 2024-04-27 16:06:37
Browse files Browse the repository at this point in the history
  • Loading branch information
kooksee committed Apr 27, 2024
1 parent 834e540 commit 14f9c37
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 82 deletions.
74 changes: 39 additions & 35 deletions templates/rapidoc.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
<!doctype html> <!-- Important: must specify -->
<!doctype html>
<!-- Important: must specify -->
<html>
<head>
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
<script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script>
</head>
<body>
<rapi-doc
spec-url="{{ .openapi_url }}"
id="r-api-doc"
theme = "dark"
primary-color = "#f54c47"
bg-color = "#2e3746"
text-color = "#bacdee"
show-header = "true"
schema-style="table"
show-method-in-nav-bar="true"
use-path-in-nav-bar="true"
show-components="true"
show-info="true"
allow-search="true"
allow-advanced-search="true"
allow-spec-url-load="true"
allow-spec-file-download="true"
allow-server-selection="true"
allow-authentication="true"
update-route="true"
match-type="regex"
persist-auth="true"
scroll-behavior="smooth"

schema-style="tree"
render-style="read"
></rapi-doc>
</body>
</html>
<head>
<meta charset="utf-8" />
<!-- Important: rapi-doc uses utf8 characters -->
<script
type="module"
src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"
></script>
</head>
<body>
<rapi-doc
spec-url="{{ .openapi_url }}"
id="r-api-doc"
theme="dark"
primary-color="#f54c47"
bg-color="#2e3746"
text-color="#bacdee"
show-header="true"
schema-style="table"
show-method-in-nav-bar="true"
use-path-in-nav-bar="true"
show-components="true"
show-info="true"
allow-search="true"
allow-advanced-search="true"
allow-spec-url-load="true"
allow-spec-file-download="true"
allow-server-selection="true"
allow-authentication="true"
update-route="true"
match-type="regex"
persist-auth="true"
scroll-behavior="smooth"
schema-style="tree"
render-style="read"
></rapi-doc>
</body>
</html>
51 changes: 29 additions & 22 deletions templates/redoc.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>{{ .title }} - ReDoc</title>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="openapi"></div>
<script>
let options = JSON.parse('{{ .openapi_options }}')
Redoc.init('{{ .openapi_url }}', options, document.getElementById('openapi'))
</script>
</body>
<head>
<title>{{ .title }} - ReDoc</title>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
rel="stylesheet"
/>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="openapi"></div>
<script>
let options = JSON.parse("{{ .openapi_options }}");
Redoc.init(
"{{ .openapi_url }}",
options,
document.getElementById("openapi"),
);
</script>
</body>
</html>
58 changes: 33 additions & 25 deletions templates/swagger.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ .title }} - Swagger UI</title>
<link rel="stylesheet" type="text/css" href="//unpkg.com/[email protected]/swagger-ui.css">
<link rel="icon" type="image/png" href="//unpkg.com/[email protected]/favicon-16x16.png"/>
<script src="//unpkg.com/[email protected]/swagger-ui-bundle.js"></script>
</head>
<body>
<div id="openapi"></div>
<script>
window.onload = function () {
let options = JSON.parse('{{ .openapi_options }}')
window.ui = SwaggerUIBundle({
deepLinking: true,
layout: "BaseLayout",
url: "{{ .openapi_url }}",
dom_id: '#openapi',
persistAuthorization: true,
...options
});
}
</script>
</body>
</html>
<head>
<meta charset="utf-8" />
<title>{{ .title }} - Swagger UI</title>
<link
rel="stylesheet"
type="text/css"
href="//unpkg.com/[email protected]/swagger-ui.css"
/>
<link
rel="icon"
type="image/png"
href="//unpkg.com/[email protected]/favicon-16x16.png"
/>
<script src="//unpkg.com/[email protected]/swagger-ui-bundle.js"></script>
</head>
<body>
<div id="openapi"></div>
<script>
window.onload = function () {
let options = JSON.parse("{{ .openapi_options }}");
window.ui = SwaggerUIBundle({
deepLinking: true,
layout: "BaseLayout",
url: "{{ .openapi_url }}",
dom_id: "#openapi",
persistAuthorization: true,
...options,
});
};
</script>
</body>
</html>

0 comments on commit 14f9c37

Please sign in to comment.