fix: additional field type

This commit is contained in:
Noah Hsu 2022-06-08 17:01:36 +08:00
parent 65fba7936c
commit cd21f14106

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",