code: func (apiDef *APIDefinition) createType(name string, tip interface{},
  	inputProps map[interface{}]interface{}) bool {
  
  	created := false
  	// check that there is no type with this name
  	if _, exist := apiDef.Types[name]; exist {
  		return created
  	}
  
  	// convert the inputProps to properties
  	props := make(map[string]interface{})
  
  	for k, p := range inputProps {
  		name, ok := k.(string)
  		if !ok {
  			panic(fmt.Errorf("property key:%v need to be a string", k))
  		}
  		props[name] = p
  	}
  
  	t := Type{
  		Name:       name,
  		Type:       tip,
  		Properties: props,
  	}
  	apiDef.Types[name] = t
  	created = true
  	return created
  }
docs: // create new type