Skip to content

Commit

Permalink
refactor(docs): use unpkg for fetching swagger ui
Browse files Browse the repository at this point in the history
  • Loading branch information
roedoejet committed Feb 24, 2023
1 parent 48158a2 commit 297b069
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 127 deletions.
Binary file removed g2p/static/swagger-ui/favicon-16x16.png
Binary file not shown.
Binary file removed g2p/static/swagger-ui/favicon-32x32.png
Binary file not shown.
104 changes: 0 additions & 104 deletions g2p/static/swagger-ui/swagger-ui-bundle.js

This file was deleted.

14 changes: 0 additions & 14 deletions g2p/static/swagger-ui/swagger-ui-standalone-preset.js

This file was deleted.

3 changes: 0 additions & 3 deletions g2p/static/swagger-ui/swagger-ui.css

This file was deleted.

14 changes: 8 additions & 6 deletions g2p/templates/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='swagger-ui/swagger-ui.css') }}">
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@4.5.0/swagger-ui.css">
<!-- <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" /> -->
<style>
Expand All @@ -14,13 +14,13 @@
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}

*,
*:before,
*:after {
box-sizing: inherit;
}

body {
margin: 0;
background: #fafafa;
Expand All @@ -32,10 +32,12 @@
<div id="swagger-ui"></div>
</body>

<script src="{{ url_for('static', filename='swagger-ui/swagger-ui-bundle.js') }}"> </script>
<script src="{{ url_for('static', filename='swagger-ui/swagger-ui-standalone-preset.js') }}"> </script>
<script src="https://unpkg.com/swagger-ui-dist@4.5.0/swagger-ui-bundle.js">
</script>
<script src="https://unpkg.com/swagger-ui-dist@4.5.0/swagger-ui-standalone-preset.js">
</script>
<script>
window.onload = function () {
window.onload = function() {

// Build a system
const ui = SwaggerUIBundle({
Expand Down

0 comments on commit 297b069

Please sign in to comment.