I'm receiving an issue submitting browser registra...
# talk-kratos
h
I'm receiving an issue submitting browser registration flow:
I[#/traits] S[#/properties/traits/$ref] doesn't validate with \"file:///etc/config/identity.default.schema.json#/properties/traits\"\n I[#/traits/relations] S[#/properties/traits/properties/relations/type] expected array, but got object
I have an array field in traits, but it's not being passed in the registration flow, wondering how I could bypass this issue?
here's the schema itself:
Copy code
{
  "$id": "<https://example.com/identity.default.schema.json>",
  "$schema": "<http://json-schema.org/draft-07/schema#>",
  "title": "Identity",
  "type": "object",
  "properties": {
    "traits": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "title": "Email",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              }
            },
            "recovery": {
              "via": "email"
            }
          }
        },
        "phone": {
          "type": "string",
          "format": "string",
          "title": "Phone",
          "minLength": 3,
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              }
            }
          }
        },
        "first_name": {
          "type": "string",
          "format": "string",
          "title": "Given Name"
        },
        "last_name": {
          "type": "string",
          "format": "string",
          "title": "Family Name"
        },
        "relations": {
          "type": "array",
          "description": "Relations",
          "items": {
            "$ref": "#/$defs/relation"
          }
        }
      },
      "required": [],
      "additionalProperties": false
    }
  },
  "$defs": {
    "relation": {
      "type": "object",
      "properties": {
        "tenant_type": {
          "type": "string",
          "format": "string",
          "title": "Tenant Type"
        },
        "tenant_id": {
          "type": "number",
          "format": "number",
          "title": "Tenant Id"
        },
        "role": {
          "type": "string",
          "format": "string",
          "title": "Role"
        }
      },
      "required": [
        "tenant_type",
        "tenant_id",
        "role"
      ]
    }
  }
}