fix(go-client): use monorepo-compatible module path (#392)
The Go SDK declared its module as github.com/vectorize-io/hindsight-client-go, but that repository doesn't exist. Update to github.com/vectorize-io/hindsight/hindsight-clients/go to match the actual monorepo path, enabling standard `go get` imports with directory-prefixed tags. Also enables isGoSubmodule in the OpenAPI generator config and updates all import references across tests, docs, and the client generation script. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
917893aac7
commit
be8728b313
15 changed files with 19 additions and 19 deletions
|
|
@ -22,7 +22,7 @@ go get golang.org/x/net/context
|
|||
Put the package under your project folder and add the following in import:
|
||||
|
||||
```go
|
||||
import hindsight "github.com/vectorize-io/hindsight-client-go"
|
||||
import hindsight "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
```
|
||||
|
||||
To use a proxy, set the environment variable `HTTP_PROXY`:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
module github.com/vectorize-io/hindsight-client-go
|
||||
module github.com/vectorize-io/hindsight/hindsight-clients/go
|
||||
|
||||
go 1.18
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ outputDir: ./
|
|||
inputSpec: ../../hindsight-docs/static/openapi.json
|
||||
packageName: hindsight
|
||||
gitUserId: vectorize-io
|
||||
gitRepoId: hindsight-client-go
|
||||
isGoSubmodule: false
|
||||
gitRepoId: hindsight/hindsight-clients/go
|
||||
isGoSubmodule: true
|
||||
enumClassPrefix: true
|
||||
structPrefix: true
|
||||
generateInterfaces: true
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/vectorize-io/hindsight-client-go"
|
||||
openapiclient "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func Test_hindsight_BanksAPIService(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/vectorize-io/hindsight-client-go"
|
||||
openapiclient "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func Test_hindsight_DirectivesAPIService(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/vectorize-io/hindsight-client-go"
|
||||
openapiclient "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func Test_hindsight_DocumentsAPIService(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/vectorize-io/hindsight-client-go"
|
||||
openapiclient "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func Test_hindsight_EntitiesAPIService(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/vectorize-io/hindsight-client-go"
|
||||
openapiclient "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func Test_hindsight_MemoryAPIService(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/vectorize-io/hindsight-client-go"
|
||||
openapiclient "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func Test_hindsight_MentalModelsAPIService(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/vectorize-io/hindsight-client-go"
|
||||
openapiclient "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func Test_hindsight_MonitoringAPIService(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/vectorize-io/hindsight-client-go"
|
||||
openapiclient "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func Test_hindsight_OperationsAPIService(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import quickstartGo from '!!raw-loader!@site/examples/api/quickstart.go';
|
|||
## Installation
|
||||
|
||||
```bash
|
||||
go get github.com/vectorize-io/hindsight-client-go
|
||||
go get github.com/vectorize-io/hindsight/hindsight-clients/go
|
||||
```
|
||||
|
||||
Requires Go 1.23+.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
hindsight "github.com/vectorize-io/hindsight-client-go"
|
||||
hindsight "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Official Go client for the Hindsight API, built on [ogen](https://github.com/oge
|
|||
## Installation
|
||||
|
||||
```bash
|
||||
go get github.com/vectorize-io/hindsight-client-go
|
||||
go get github.com/vectorize-io/hindsight/hindsight-clients/go
|
||||
```
|
||||
|
||||
Requires Go 1.25+.
|
||||
|
|
@ -24,7 +24,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
hindsight "github.com/vectorize-io/hindsight-client-go"
|
||||
hindsight "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
@ -53,7 +53,7 @@ func main() {
|
|||
## Client Initialization
|
||||
|
||||
```go
|
||||
import hindsight "github.com/vectorize-io/hindsight-client-go"
|
||||
import hindsight "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||||
|
||||
// Default client
|
||||
client, err := hindsight.New("http://localhost:8888")
|
||||
|
|
@ -231,7 +231,7 @@ resp, _ := client.Reflect(ctx, "my-bank", "Summarize project X",
|
|||
For operations not covered by the high-level wrapper (documents, entities, mental models, directives, operations), access the generated ogen client directly:
|
||||
|
||||
```go
|
||||
import "github.com/vectorize-io/hindsight-client-go/internal/ogenapi"
|
||||
import "github.com/vectorize-io/hindsight/hindsight-clients/go/internal/ogenapi"
|
||||
|
||||
ogen := client.OgenClient()
|
||||
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ else
|
|||
-o . \
|
||||
--package-name hindsight \
|
||||
--git-user-id vectorize-io \
|
||||
--git-repo-id hindsight-client-go \
|
||||
--git-repo-id hindsight/hindsight-clients/go \
|
||||
--global-property apiDocs=false,apiTests=false,modelDocs=false,modelTests=false
|
||||
|
||||
# Remove OpenAPI Generator boilerplate files
|
||||
|
|
|
|||
Loading…
Reference in a new issue