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

@ -19,7 +19,7 @@
Optional bool
Immutable bool
Sensitive bool
Enums []Enum
Enums []string
}
@ -35,12 +35,9 @@
Immutable: {{ $f.Immutable }},
Sensitive: {{ $f.Sensitive }},
{{- if len $f.Enums }}
Enums: []Enum{
Enums: []string{
{{- range $e := $f.Enums }}
{
Label: "{{ $e.Label }}",
Value: "{{ $e.Value }}",
},
"{{ $e.Value }}",
{{- end }}
},
{{- else }}