package health import ( "net/http" "github.com/veylant/ia-gateway/docs" ) // DocsYAMLHandler serves the raw OpenAPI 3.1 YAML spec at /docs/openapi.yaml. func DocsYAMLHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/yaml") w.WriteHeader(http.StatusOK) _, _ = w.Write(docs.OpenAPIYAML) } // DocsHTMLHandler serves a Swagger UI page at /docs. // The UI is loaded from the official CDN — no npm build required. func DocsHTMLHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") w.WriteHeader(http.StatusOK) _, _ = w.Write([]byte(swaggerHTML)) } // swaggerHTML is an inline Swagger UI page that loads the spec from /docs/openapi.yaml. const swaggerHTML = `