Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Schema is not marshalled correctly #198

Open
ili16 opened this issue Jan 5, 2024 · 0 comments
Open

Getting Schema is not marshalled correctly #198

ili16 opened this issue Jan 5, 2024 · 0 comments

Comments

@ili16
Copy link

ili16 commented Jan 5, 2024

When running the go code to retrieve schema information as described in the documentation;

package main

import (
  "context"
  "fmt"

  "github.com/weaviate/weaviate-go-client/v4/weaviate"
)

func main() {
  cfg := weaviate.Config{
    Host:   "localhost:8080",
    Scheme: "http",
  }
  client, err := weaviate.NewClient(cfg)
  if err != nil {
    panic(err)
  }

  schema, err := client.Schema().Getter().Do(context.Background())
  if err != nil {
    panic(err)
  }
  fmt.Printf("%v", schema)

I receive a hexadecimal representation of the Dump:

Schema: &{{[0xc0000be0a0] }}

I can fix that manually by marshalling it myself:

jsonSchema, err := json.MarshalIndent(schema, "", "  ")

if err != nil {
	panic(err)
}

fmt.Printf("%s\n", jsonSchema)

The python client and a curl work fine so I would expect the go-client to behave the same. I guess the problem lies in the Getter.Do Function but I do not know how to test the change locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant