serve the OpenAPI 3.0 spec at /swagger

Embed openapi/v1/headscale.yaml and point the Swagger UI at it, replacing the
generated Swagger 2.0 document.
This commit is contained in:
Kristoffer Dalby
2026-06-17 16:00:26 +00:00
parent 29fc14dd73
commit e1325fbacd
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -588,7 +588,7 @@ func (h *Headscale) createRouter(apiV1 http.Handler) *chi.Mux {
// TODO(kristoffer): move swagger into a package
r.Get("/swagger", headscale.SwaggerUI)
r.Get("/swagger/v1/openapiv2.json", headscale.SwaggerAPIv1)
r.Get("/swagger/v1/openapi.yaml", headscale.SwaggerAPIv1)
r.Post("/verify", h.VerifyHandler)