mirror of
https://codeberg.org/MarkusThielker/next-ory.git
synced 2025-07-04 13:59:17 +00:00
NORY-22: add missing UI for boolean traits
This commit is contained in:
parent
4736148219
commit
206a40baed
2 changed files with 20 additions and 0 deletions
|
@ -51,6 +51,7 @@ export function generateZodSchema(properties: KratosSchemaProperties) {
|
|||
zodType = zodType.max(value.maxLength);
|
||||
}
|
||||
break;
|
||||
case 'integer':
|
||||
case 'number':
|
||||
zodType = z.number();
|
||||
if (value.minimum) {
|
||||
|
@ -60,6 +61,9 @@ export function generateZodSchema(properties: KratosSchemaProperties) {
|
|||
zodType = zodType.max(value.maximum);
|
||||
}
|
||||
break;
|
||||
case 'boolean':
|
||||
zodType = z.boolean();
|
||||
break;
|
||||
case 'object':
|
||||
const schemaCopy = structuredClone(schema);
|
||||
schemaCopy.properties.traits.properties = value.properties!;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue