Fix enums in generated admin schema code.

This commit is contained in:
mikestefanello 2025-08-15 09:51:06 -04:00
parent 3ffdea90c3
commit be5c1f9197
5 changed files with 36 additions and 10 deletions

View file

@ -15,7 +15,7 @@ type FieldSchema struct {
Optional bool
Immutable bool
Sensitive bool
Enums []Enum
Enums []string
}
const NamePasswordToken = "PasswordToken"
@ -98,4 +98,16 @@ var fieldsUser = []*FieldSchema{
Sensitive: false,
Enums: nil,
},
{
Name: "role",
Type: field.TypeEnum,
Optional: false,
Immutable: false,
Sensitive: false,
Enums: []string{
"read",
"write",
"admin",
},
},
}