func ConvertInt16(str string) (int16, error) {
	i, err := strconv.ParseInt(str, 10, 16)
	if err != nil {
		return 0, err
	}
	return int16(i), nil
}
ConvertInt16 turn a string into a int16
package swag
import (
	"math"
	"strconv"
	"strings"
)
const (
	maxJSONFloat         = float64(1<<53 - 1)   
	minJSONFloat         = -float64(1<<53 - 1)  
	epsilon      float64 = 1e-9
)
func IsFloat64AJSONInteger(f float64) bool {
	if math.IsNaN(f) || math.IsInf(f, 0) || f < minJSONFloat || f > maxJSONFloat {
		return false
	}
	fa := math.Abs(f)
	g := float64(uint64(f))
	ga := math.Abs(g)
	diff := math.Abs(f - g)
	switch {
	case f == g:  
		return true
	case f == float64(int64(f)) || f == float64(uint64(f)):  
		return true
	case f == 0 || g == 0 || diff < math.SmallestNonzeroFloat64:  
		return diff < (epsilon * math.SmallestNonzeroFloat64)
	}
	return diff/math.Min(fa+ga, math.MaxFloat64) < epsilon
}
var evaluatesAsTrue map[string]struct{}
func init() {
	evaluatesAsTrue = map[string]struct{}{
		"true":     {},
		"1":        {},
		"yes":      {},
		"ok":       {},
		"y":        {},
		"on":       {},
		"selected": {},
		"checked":  {},
		"t":        {},
		"enabled":  {},
	}
}
func ConvertBool(str string) (bool, error) {
	_, ok := evaluatesAsTrue[strings.ToLower(str)]
	return ok, nil
}
func ConvertFloat32(str string) (float32, error) {
	f, err := strconv.ParseFloat(str, 32)
	if err != nil {
		return 0, err
	}
	return float32(f), nil
}
func ConvertFloat64(str string) (float64, error) {
	return strconv.ParseFloat(str, 64)
}
func ConvertInt8(str string) (int8, error) {
	i, err := strconv.ParseInt(str, 10, 8)
	if err != nil {
		return 0, err
	}
	return int8(i), nil
}