fix: additional field type

refactor/fs
Noah Hsu 2022-06-08 17:01:36 +08:00
parent 65fba7936c
commit cd21f14106
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ func getAdditionalItems(t reflect.Type) []Item {
}
item := Item{
Name: tag.Get("json"),
Type: strings.ToLower(field.Name),
Type: strings.ToLower(field.Type.Name()),
Default: tag.Get("default"),
Values: tag.Get("values"),
Required: tag.Get("required") == "true",