Skip to content

Commit 91d4d0e

Browse files
committed
Load Swagger UI earlier
1 parent 3d36b23 commit 91d4d0e

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

docs/api/index.html

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@
1010
<div id="swagger-ui"></div>
1111
<script src="https://unpkg.com/[email protected]/swagger-ui-bundle.js" crossorigin></script>
1212
<script>
13-
window.onload = () => {
14-
window.ui = SwaggerUIBundle({
15-
url: './spec.json',
16-
dom_id: '#swagger-ui',
17-
deepLinking: true,
18-
presets: [
19-
SwaggerUIBundle.presets.apis,
20-
],
21-
});
22-
};
13+
window.ui = SwaggerUIBundle({
14+
url: './spec.json',
15+
dom_id: '#swagger-ui',
16+
deepLinking: true,
17+
presets: [
18+
SwaggerUIBundle.presets.apis,
19+
],
20+
});
2321
</script>
2422
</body>
2523
</html>

0 commit comments

Comments
 (0)