package main import ( _ "embed" "fmt" "net/http" "github.com/labstack/echo/v4" ) //go:embed openapi/openapi.json var openAPISpecJSON string func (a *App) handleOpenAPISpec(c echo.Context) error { return c.Blob(http.StatusOK, "application/json; charset=utf-8", []byte(openAPISpecJSON)) } func (a *App) handleOpenAPIDocs(c echo.Context) error { html := fmt.Sprintf(`
Use Try it out for live testing. For admin endpoints: login with the form below, then your token is auto-attached to Swagger Authorize.