Fix swagger

This commit is contained in:
Mike Schwörer 2023-05-27 17:51:56 +02:00
parent fd72b512f8
commit 7d9a58ae54
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
11 changed files with 60 additions and 39 deletions

View File

@ -64,8 +64,6 @@
- the explanation of user_id and key in ./website is now wrong (was already wrong and is even wronger now that there are multiple KeyToken's with permissions etc)
- swagger broken?
#### PERSONAL
- in my script: use `srvname` for sendername

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

View File

@ -0,0 +1,16 @@
html {
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
background: #fafafa;
}

View File

@ -1,35 +1,19 @@
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>API Documentation</title>
<link rel="stylesheet" href="swagger-ui.css" />
<!-- <link rel="stylesheet" href="themes/theme-feeling-blue.css" /> -->
<!-- <link rel="stylesheet" href="themes/theme-flattop.css" /> -->
<!-- <link rel="stylesheet" href="themes/theme-material.css" /> -->
<!-- <link rel="stylesheet" href="themes/theme-monokai.css" /> -->
<!-- <link rel="stylesheet" href="themes/theme-muted.css" /> -->
<!-- <link rel="stylesheet" href="themes/theme-newspaper.css" /> -->
<!-- <link rel="stylesheet" href="themes/theme-outline.css" /> -->
</head>
<body>
<div id="swagger-ui"></div>
<script src="swagger-ui-bundle.js" crossorigin></script>
<script src="swagger-ui-standalone-preset.js" crossorigin></script>
<script>
window.onload = () => {
window.ui = SwaggerUIBundle({
url: './swagger.json',
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
layout: "StandaloneLayout",
defaultModelsExpandDepth: 0,
});
};
</script>
</body>
</html>
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
<link rel="stylesheet" type="text/css" href="index.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" />
</head>
<body>
<div id="swagger-ui"></div>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script src="./swagger-initializer.js" charset="UTF-8"> </script>
</body>
</html>

View File

@ -0,0 +1,21 @@
window.onload = function() {
//<editor-fold desc="Changeable Configuration Block">
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
window.ui = SwaggerUIBundle({
url: './swagger.json',
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
defaultModelsExpandDepth: 0,
});
//</editor-fold>
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -14,6 +14,7 @@ import (
//go:embed *.yaml
//go:embed *.js
//go:embed *.css
//go:embed *.png
//go:embed themes/*
var assets embed.FS