func GetCanonicalTypeName(model interface{}) string {
	if namer, ok := model.(OpenAPICanonicalTypeNamer); ok {
		return namer.OpenAPICanonicalTypeName()
	}
	t := reflect.TypeOf(model)
	if t.Kind() == reflect.Ptr {
		t = t.Elem()
	}
	if t.PkgPath() == "" {
		return t.Name()
	}
	path := t.PkgPath()
	if strings.Contains(path, "/vendor/") {
		path = path[strings.Index(path, "/vendor/")+len("/vendor/"):]
	} else if strings.HasPrefix(path, "vendor/") {
		path = strings.TrimPrefix(path, "vendor/")
	}
	return path + "." + t.Name()
}
GetCanonicalTypeName will find the canonical type name of a sample object, removing
the "vendor" part of the path
package util
import (
	"reflect"
	"strings"
)
func ToCanonicalName(name string) string {
	return ToRESTFriendlyName(name)
}
func ToRESTFriendlyName(name string) string {
	nameParts := strings.Split(name, "/")
	if len(nameParts) > 0 && strings.Contains(nameParts[0], ".") {
		parts := strings.Split(nameParts[0], ".")
		for i, j := 0, len(parts)-1; i < j; i, j = i+1, j-1 {
			parts[i], parts[j] = parts[j], parts[i]
		}
		nameParts[0] = strings.Join(parts, ".")
	}
	return strings.Join(nameParts, ".")
}
type OpenAPICanonicalTypeNamer interface {
	OpenAPICanonicalTypeName() string
}