Skip to content

Instantly share code, notes, and snippets.

@nabam
Created December 3, 2019 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nabam/de8d377f3d95d7597a03036aca8d48ce to your computer and use it in GitHub Desktop.
Save nabam/de8d377f3d95d7597a03036aca8d48ce to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang=en>
<head>
<title>Swagger UI</title>
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@3/swagger-ui.css">
<script src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
</head>
<body>
<div class="swagger-ui" id="swagger-ui"></div>
<script>
var url = new URL(window.location.href);
var service = url.searchParams.get("service");
if (service) {
const ui = SwaggerUIBundle({
url: "/kiali/api/namespaces/default/services/" + service + "/apispec",
dom_id: '#swagger-ui',
layout: "BaseLayout"
})
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment