Files
abdus cec7f1566e feat(api): Add Swagger UI for v1 endpoints
Serve interactive docs at /api, covering only the current /api/v1/*
endpoints. Deprecated /api/diyanet/* endpoints are left undocumented.
2026-10-08 21:29:07 +02:00

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>`