Go's semantic import versioning gives a path without a /vN suffix exactly two publishable major versions: v0 and v1. This client rides the shared 8.5.x line, so at the bare path every tag it cut was unpublishable -- v8.5.89 and v8.5.156 both sat on the repo while proxy.golang.org served v1.0.5 and always would. A tag the proxy rejects is not a release, it is a decoration. The host half does NOT move. hanzoai/go-sdk is the path already on the proxy and pkg.go.dev, and renaming it would strand every existing import; adding the suffix does not, because v1 consumers keep resolving v1.0.5 at the old path. That is what the suffix is for. The generator writes the same path into 2,272 doc references, so sdks.yaml's git-repo-id carries it too -- otherwise the next regeneration would tell readers to import a path whose 8.x tags the proxy refuses. And the release workflow now READS the path from go.mod instead of restating it: one spelling, in the file that defines it, so the warm step cannot go on asking for a path nobody publishes.
7.4 KiB
\OpenapiAPI
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| GetCapabilities | Get /v1 | Every capability this deployment answers, and where to follow each one |
| GetCapability | Get /v1/{name} | One capability's operations, with the address and method to call each |
| GetOpenapiCommands | Get /v1/openapi/commands | Every operation this API answers, as a command |
| GetOpenapiJson | Get /v1/openapi.json | The API description this SDK was generated from |
| PostMcp | Post /v1/mcp | The agent endpoint: every subsystem's operations as MCP tools |
GetCapabilities
Root GetCapabilities(ctx).Execute()
Every capability this deployment answers, and where to follow each one
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OpenapiAPI.GetCapabilities(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpenapiAPI.GetCapabilities``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCapabilities`: Root
fmt.Fprintf(os.Stdout, "Response from `OpenapiAPI.GetCapabilities`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetCapabilitiesRequest struct via the builder pattern
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetCapability
Index GetCapability(ctx, name).Execute()
One capability's operations, with the address and method to call each
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
name := "name_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OpenapiAPI.GetCapability(context.Background(), name).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpenapiAPI.GetCapability``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCapability`: Index
fmt.Fprintf(os.Stdout, "Response from `OpenapiAPI.GetCapability`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| name | string |
Other Parameters
Other parameters are passed through a pointer to a apiGetCapabilityRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetOpenapiCommands
GetOpenapiCommands(ctx).Execute()
Every operation this API answers, as a command
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.OpenapiAPI.GetOpenapiCommands(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpenapiAPI.GetOpenapiCommands``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetOpenapiCommandsRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetOpenapiJson
GetOpenapiJson(ctx).Execute()
The API description this SDK was generated from
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.OpenapiAPI.GetOpenapiJson(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpenapiAPI.GetOpenapiJson``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetOpenapiJsonRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostMcp
MCPResponse PostMcp(ctx).MCPRequest(mCPRequest).Execute()
The agent endpoint: every subsystem's operations as MCP tools
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
mCPRequest := *openapiclient.NewMCPRequest() // MCPRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OpenapiAPI.PostMcp(context.Background()).MCPRequest(mCPRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpenapiAPI.PostMcp``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostMcp`: MCPResponse
fmt.Fprintf(os.Stdout, "Response from `OpenapiAPI.PostMcp`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiPostMcpRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| mCPRequest | MCPRequest |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]