Skip to content

Commit

Permalink
chore: Swagger UI deep linking (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Mar 20, 2024
1 parent 283d650 commit 0d89dd2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/api/static/swagger.html
Expand Up @@ -7,24 +7,25 @@
<title>Boltz API</title>
<link
rel="stylesheet"
href="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui.css"
href="https://unpkg.com/swagger-ui-dist@5.12.0/swagger-ui.css"
/>
</head>
<body style="margin: 0">
<div id="swagger-ui"></div>
<script
src="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-bundle.js"
src="https://unpkg.com/swagger-ui-dist@5.12.0/swagger-ui-bundle.js"
crossorigin
></script>
<script
src="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-standalone-preset.js"
src="https://unpkg.com/swagger-ui-dist@5.12.0/swagger-ui-standalone-preset.js"
crossorigin
></script>
<script>
window.onload = () => {
window.ui = SwaggerUIBundle({
url: '/swagger-spec.json',
dom_id: '#swagger-ui',
deepLinking: true,
presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
layout: 'StandaloneLayout',
});
Expand Down

0 comments on commit 0d89dd2

Please sign in to comment.