mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-19 06:44:58 +09:00
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:
+1
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user