-
Notifications
You must be signed in to change notification settings - Fork 970
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename identity traits schema to identity schema
Closes #531 BREAKING CHANGE: This patch renames the Identity Traits JSON Schema to Identity JSON Schema. The identity payload has changed from ``` { - "traits_schema_url": "...", - "traits_schema_id": "...", + "schema_url": "...", + "schema_id": "...", } ``` Additionally, it is now expected that your Identity JSON Schema includes a "traits" key at the root level. **Before (example)** ``` { "$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": { "email": { "type": "string", "format": "email", "title": "E-Mail", "minLength": 3, "ory.sh/kratos": { "credentials": { "password": { "identifier": true } }, "verification": { "via": "email" }, "recovery": { "via": "email" } } } }, "required": [ "email" ], "additionalProperties": false } ``` **After (example)** ``` { "$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, "ory.sh/kratos": { "credentials": { "password": { "identifier": true } }, "verification": { "via": "email" }, "recovery": { "via": "email" } } } }, "required": [ "email" ], "additionalProperties": false } } } ``` You also need to remove the `traits` key from your ORY Kratos config like this: ``` identity: - traits: - default_schema_url: http://test.kratos.ory.sh/default-identity.schema.json - schemas: - - id: other - url: http://test.kratos.ory.sh/other-identity.schema.json + default_schema_url: http://test.kratos.ory.sh/default-identity.schema.json + schemas: + - id: other + url: http://test.kratos.ory.sh/other-identity.schema.json ``` Do not forget to also update environment variables for the Identity JSON Schema as well if set.
- Loading branch information
Showing
147 changed files
with
1,484 additions
and
7,435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.