()
| 31 | } |
| 32 | |
| 33 | func (s *Server) registerInfo() { |
| 34 | huma.Register(s.API, huma.Operation{ |
| 35 | OperationID: "getInfo", |
| 36 | Method: http.MethodGet, |
| 37 | Path: "/v1/info", |
| 38 | Summary: "Deployment info", |
| 39 | Description: "Public deployment metadata: the shared agent domain (if slug registration is enabled) and the public base URL. Unauthenticated.", |
| 40 | Tags: []string{"meta"}, |
| 41 | }, func(ctx context.Context, _ *struct{}) (*infoOutput, error) { |
| 42 | return &infoOutput{Body: DeploymentInfoView{ |
| 43 | Version: APIVersion, |
| 44 | SharedDomain: s.deps.SharedDomain, |
| 45 | SlugRegistrationEnabled: s.deps.SharedDomain != "", |
| 46 | PublicURL: s.deps.PublicURL, |
| 47 | }}, nil |
| 48 | }) |
| 49 | } |
| 50 | |
| 51 | // --- GET /v1/agents --------------------------------------------------------- |
| 52 |
no test coverage detected