* Create index.html for Swagger UI integration * Link to Swagger UI CSS and JS from CDN * Configure Swagger UI to load API specification from api.json
30 lines
807 B
HTML
30 lines
807 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>WhatsHooked API</title>
|
|
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5/swagger-ui.css" />
|
|
<style>
|
|
body { margin: 0; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="swagger-ui"></div>
|
|
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js"></script>
|
|
<script>
|
|
SwaggerUIBundle({
|
|
url: "../api.json",
|
|
dom_id: "#swagger-ui",
|
|
presets: [
|
|
SwaggerUIBundle.presets.apis,
|
|
SwaggerUIBundle.SwaggerUIStandalonePreset,
|
|
],
|
|
layout: "BaseLayout",
|
|
deepLinking: true,
|
|
tryItOutEnabled: true,
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|