In this schema file what is "<ory.sh/kratos>". I a...
# talk-kratos
m
In this schema file what is "ory.sh/kratos". I am confused about this custom key in json schema, how does it work?
Copy code
{
  "$id": "<https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json>",
  "$schema": "<http://json-schema.org/draft-07/schema#>",
  "title": "Person",
  "type": "object",
  "properties": {
    "traits": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "title": "E-Mail",
          "minLength": 3,
---------------------------------------------------------
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              }
            },
            "verification": {
              "via": "email"
            },
            "recovery": {
              "via": "email"
            }
          }
---------------------------------------------------------
        },
        "name": {
          "type": "object",
          "properties": {
            "first": {
              "title": "First Name",
              "type": "string"
            },
            "last": {
              "title": "Last Name",
              "type": "string"
            }
          }
        }
      },
      "required": [
        "email"
      ],
      "additionalProperties": false
    }
  }
}
m
you mean credentials?
or what exactly was your question 😅
m
Copy code
"email": {
          "type": "string",
          "format": "email",
          "title": "E-Mail",
          "minLength": 3,
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              }
            },
            "verification": {
              "via": "email"
            },
            "recovery": {
              "via": "email"
            }
          }
        },
In this section "email" is a string with format email and minLength 3. then what is "ory.sh/kratos". This schema should be generic right? I can't understand this schema. Please tell me if I am still unable to explain what I am trying to ask? 😅
Custom extensions are explicitly allowed in the json schema standard, and we use this one to mark which keys hold what special value (e.g. the identifier used for password auth)
m
oh, okay. Now I got the idea.
Thank you so much