package api import ( _ "embed" "net/http" ) //go:embed openapi.yaml var openAPISpec []byte // handleOpenAPISpec serves the raw OpenAPI document. func (s *Server) handleOpenAPISpec(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "application/yaml") _, _ = w.Write(openAPISpec) } // docsHTML is a self-contained API docs viewer. It loads Redoc from a CDN when // online, but falls back to a readable, dependency-free rendering of // /openapi.yaml so the page works air-gapped too. const docsHTML = `
Rendering API reference…