Hi, I'm trying to load namespaces from a `keto.nam...
# talk-keto
a
Hi, I'm trying to load namespaces from a
keto.namespaces.ts
file but when I try to bild/run I have error "
Copy code
The configuration contains values or keys which are invalid:
namespaces: map[location:file://./keto_namespaces.ts]
            ^-- oneOf failed

The configuration contains values or keys which are invalid:
namespaces: map[location:file://./keto_namespaces.ts]
            ^-- expected string, but got object

The configuration contains values or keys which are invalid:
namespaces: map[location:file://./keto_namespaces.ts]
            ^-- expected array, but got object

Error: unable to initialize config provider: I[#/namespaces] S[#/properties/namespaces/oneOf] oneOf failed
  I[#/namespaces] S[#/properties/namespaces/oneOf/0/type] expected string, but got object
  I[#/namespaces] S[#/properties/namespaces/oneOf/1/type] expected array, but got object
My
keto.yml
is :
Copy code
dsn: memory

namespaces:
  location: "file://./keto_namespaces.ts"

log:
  level: debug
  format: json
  leak_sensitive_values: true


serve:
  read:
    host: 0.0.0.0
    port: 4466
  write:
    host: 0.0.0.0
    port: 4467
And my
docker-compose.yml
is:
Copy code
version: "3.2"

services:
  keto:
    image: oryd/keto:v0.7.0-alpha.1-sqlite
    ports:
      - "4466:4466"
      - "4467:4467"
    command: serve -c /home/ory/keto.yml
    restart: on-failure
    volumes:
      - type: bind
        source: .
        target: /home/ory
And the
keto.namespaces.ts
is:
Copy code
import {Namespace} from "@ory/keto-namespace-types"

class User implements Namespace {
  related: {
    manager: User[]
  }
}

class Group implements Namespace {
  related: {
    members: (User | Group)[]
  }
}
I checked out the master of
git@github.com:ory/keto.git
. Can somebody help me?
OK I figured out the reason, I was using v.0.7.0 and it does not support the :
Copy code
namespaces:
  location: "file://..."
format. After loading the v.0.11.0 with postgress it loaded.