Supported capabilites of JSON Schema #1591
-
Hello guys for example "enum" and "descriptions" fields in props are not outputted. what can i use when i define properties? is there something where i see what i can use and what not. with try and error is very time intensive. also min length, disabled or required fields are not respected and dont apear in the output. {
"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","password"], Output:
I render the form automatic with the response of for example registration initializing. so it would be nice that i can render different field types full automatic even with classes and so on... the meta section should be great |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
It is best not to store too much data in the Identity Model/Schema. If you want to display messages, that is best handled in your front end (depends on what exactly you are looking for). This document - which you have probably seen - goes into detail on what JSON vocabulary extensions are possible. At the bottom it says
Required fields not being required is a known issue, please read more about it here: #400 . I hope this answers some of your questions, it is a topic touching a lot of points, and please let me know if I can assist you further with this. |
Beta Was this translation helpful? Give feedback.
It is best not to store too much data in the Identity Model/Schema.
It usually should contain only traits that are relevant to that user's identity.
If the data is related more to e.g. your business logic, it would make sense to store it somewhere else ( where it is needed later on).
You also have to keep in mind that identity traits are visible to the user.
If you want to display messages, that is best handled in your front end (depends on what exactly you are looking for).
This document - which you have probably seen - goes into detail on what JSON vocabulary extensions are possible.
At the bottom it says