From be8728b3132f08898890bd5533c2b729c96ec5ef Mon Sep 17 00:00:00 2001 From: Eliah Rusin Date: Wed, 18 Feb 2026 12:35:13 +0300 Subject: [PATCH] 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 --- hindsight-clients/go/README.md | 2 +- hindsight-clients/go/go.mod | 2 +- hindsight-clients/go/openapi-generator-config.yaml | 4 ++-- hindsight-clients/go/test/api_banks_test.go | 2 +- hindsight-clients/go/test/api_directives_test.go | 2 +- hindsight-clients/go/test/api_documents_test.go | 2 +- hindsight-clients/go/test/api_entities_test.go | 2 +- hindsight-clients/go/test/api_memory_test.go | 2 +- hindsight-clients/go/test/api_mental_models_test.go | 2 +- hindsight-clients/go/test/api_monitoring_test.go | 2 +- hindsight-clients/go/test/api_operations_test.go | 2 +- hindsight-docs/docs/sdks/go.md | 2 +- hindsight-docs/examples/api/quickstart.go | 2 +- hindsight-docs/versioned_docs/version-0.4/sdks/go.md | 8 ++++---- scripts/generate-clients.sh | 2 +- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/hindsight-clients/go/README.md b/hindsight-clients/go/README.md index 41b9ce7a..7aa53d98 100644 --- a/hindsight-clients/go/README.md +++ b/hindsight-clients/go/README.md @@ -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`: diff --git a/hindsight-clients/go/go.mod b/hindsight-clients/go/go.mod index 592de041..2a326fd7 100644 --- a/hindsight-clients/go/go.mod +++ b/hindsight-clients/go/go.mod @@ -1,4 +1,4 @@ -module github.com/vectorize-io/hindsight-client-go +module github.com/vectorize-io/hindsight/hindsight-clients/go go 1.18 diff --git a/hindsight-clients/go/openapi-generator-config.yaml b/hindsight-clients/go/openapi-generator-config.yaml index b0b864f6..9679f513 100644 --- a/hindsight-clients/go/openapi-generator-config.yaml +++ b/hindsight-clients/go/openapi-generator-config.yaml @@ -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 diff --git a/hindsight-clients/go/test/api_banks_test.go b/hindsight-clients/go/test/api_banks_test.go index 0f0d10d3..350b366b 100644 --- a/hindsight-clients/go/test/api_banks_test.go +++ b/hindsight-clients/go/test/api_banks_test.go @@ -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) { diff --git a/hindsight-clients/go/test/api_directives_test.go b/hindsight-clients/go/test/api_directives_test.go index 730f8de8..6002f250 100644 --- a/hindsight-clients/go/test/api_directives_test.go +++ b/hindsight-clients/go/test/api_directives_test.go @@ -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) { diff --git a/hindsight-clients/go/test/api_documents_test.go b/hindsight-clients/go/test/api_documents_test.go index d9c4efbd..bfcd5365 100644 --- a/hindsight-clients/go/test/api_documents_test.go +++ b/hindsight-clients/go/test/api_documents_test.go @@ -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) { diff --git a/hindsight-clients/go/test/api_entities_test.go b/hindsight-clients/go/test/api_entities_test.go index d214b8b8..fb0e7d41 100644 --- a/hindsight-clients/go/test/api_entities_test.go +++ b/hindsight-clients/go/test/api_entities_test.go @@ -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) { diff --git a/hindsight-clients/go/test/api_memory_test.go b/hindsight-clients/go/test/api_memory_test.go index acb326a5..311be732 100644 --- a/hindsight-clients/go/test/api_memory_test.go +++ b/hindsight-clients/go/test/api_memory_test.go @@ -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) { diff --git a/hindsight-clients/go/test/api_mental_models_test.go b/hindsight-clients/go/test/api_mental_models_test.go index 901cbf77..4326eaa5 100644 --- a/hindsight-clients/go/test/api_mental_models_test.go +++ b/hindsight-clients/go/test/api_mental_models_test.go @@ -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) { diff --git a/hindsight-clients/go/test/api_monitoring_test.go b/hindsight-clients/go/test/api_monitoring_test.go index 55a135f2..f3057d95 100644 --- a/hindsight-clients/go/test/api_monitoring_test.go +++ b/hindsight-clients/go/test/api_monitoring_test.go @@ -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) { diff --git a/hindsight-clients/go/test/api_operations_test.go b/hindsight-clients/go/test/api_operations_test.go index 3f07288b..b98401a4 100644 --- a/hindsight-clients/go/test/api_operations_test.go +++ b/hindsight-clients/go/test/api_operations_test.go @@ -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) { diff --git a/hindsight-docs/docs/sdks/go.md b/hindsight-docs/docs/sdks/go.md index e97468ae..ecc833f9 100644 --- a/hindsight-docs/docs/sdks/go.md +++ b/hindsight-docs/docs/sdks/go.md @@ -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+. diff --git a/hindsight-docs/examples/api/quickstart.go b/hindsight-docs/examples/api/quickstart.go index 69ed9ed6..06a3458d 100644 --- a/hindsight-docs/examples/api/quickstart.go +++ b/hindsight-docs/examples/api/quickstart.go @@ -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() { diff --git a/hindsight-docs/versioned_docs/version-0.4/sdks/go.md b/hindsight-docs/versioned_docs/version-0.4/sdks/go.md index 8b60a1db..3d189f46 100644 --- a/hindsight-docs/versioned_docs/version-0.4/sdks/go.md +++ b/hindsight-docs/versioned_docs/version-0.4/sdks/go.md @@ -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() diff --git a/scripts/generate-clients.sh b/scripts/generate-clients.sh index 1da5a7fd..a6f361f2 100755 --- a/scripts/generate-clients.sh +++ b/scripts/generate-clients.sh @@ -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