Serve interactive docs at /api, covering only the current /api/v1/* endpoints. Deprecated /api/diyanet/* endpoints are left undocumented.
28 lines
617 B
Go
28 lines
617 B
Go
package api
|
|
|
|
import _ "embed"
|
|
|
|
//go:embed openapi.yaml
|
|
var openapiSpec []byte
|
|
|
|
const swaggerHTML = `<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Prayer Times API</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.33.1/swagger-ui.css">
|
|
</head>
|
|
<body>
|
|
<div id="swagger-ui"></div>
|
|
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.33.1/swagger-ui-bundle.js"></script>
|
|
<script>
|
|
window.onload = () => {
|
|
SwaggerUIBundle({
|
|
url: "/api/openapi.yaml",
|
|
dom_id: "#swagger-ui",
|
|
});
|
|
};
|
|
</script>
|
|
</body>
|
|
</html>`
|