Documentation
¶
Overview ¶
Package api contains the REST API for ToolHive.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DocsRouter ¶ added in v0.0.35
DocsRouter creates a new router for documentation endpoints.
func Serve ¶
func Serve( ctx context.Context, address string, isUnixSocket bool, debugMode bool, enableDocs bool, oidcConfig *auth.TokenValidatorConfig, ) error
Serve starts the server on the given address and serves the API. It is assumed that the caller sets up appropriate signal handling. If isUnixSocket is true, address is treated as a UNIX socket path. If oidcConfig is provided, OIDC authentication will be enabled for all API endpoints.
func ServeOpenAPI ¶ added in v0.0.35
func ServeOpenAPI(w http.ResponseWriter, _ *http.Request)
ServeOpenAPI writes the OpenAPI specification as JSON to the response. @Summary Get OpenAPI specification @Description Returns the OpenAPI specification for the API @Tags system @Produce json @Success 200 {object} object "OpenAPI specification" @Router /api/openapi.json [get]
func ServeScalar ¶ added in v0.0.35
func ServeScalar(w http.ResponseWriter, _ *http.Request)
ServeScalar serves the Scalar API reference page
Types ¶
This section is empty.