code: func (a *ActionDefinition) UserTypes() map[string]*UserTypeDefinition {
  	types := make(map[string]*UserTypeDefinition)
  	allp := a.AllParams().Type.ToObject()
  	if a.Payload != nil {
  		allp["__payload__"] = &AttributeDefinition{Type: a.Payload}
  	}
  	for n, ut := range UserTypes(allp) {
  		types[n] = ut
  	}
  	for _, r := range a.Responses {
  		if mt := Design.MediaTypeWithIdentifier(r.MediaType); mt != nil {
  			types[mt.TypeName] = mt.UserTypeDefinition
  			for n, ut := range UserTypes(mt.UserTypeDefinition) {
  				types[n] = ut
  			}
  		}
  	}
  	if len(types) == 0 {
  		return nil
  	}
  	return types
  }
docs: // UserTypes returns all the user types used by the action payload and parameters.