optimized

This commit is contained in:
MaxToby
2021-01-16 11:53:17 +08:00
parent ce24620329
commit d06684494a
8 changed files with 141 additions and 21 deletions

View File

@ -14,6 +14,7 @@ type (
Style string
Dir string
ParentPackage string
FileName string
}
)
@ -24,6 +25,9 @@ var (
"int32": reflect.Int,
"int64": reflect.Int64,
"[]string": reflect.Slice,
"[]int": reflect.Slice,
"[]int64": reflect.Slice,
"[]int32": reflect.Slice,
"bool": reflect.Bool,
"struct": reflect.Struct,
}
@ -153,7 +157,6 @@ type schemaCore struct {
Example json.RawMessage `json:"example,omitempty"`
Items *swaggerItemsObject `json:"items,omitempty"`
// If the item is an enumeration include a list of all the *NAMES* of the
// enum values. I'm not sure how well this will work but assuming all enums
// start from 0 index it will be great. I don't think that is a good assumption.