code: func (a *APIDefinition) IterateMediaTypes(it MediaTypeIterator) error {
  	names := make([]string, len(a.MediaTypes))
  	i := 0
  	for n := range a.MediaTypes {
  		names[i] = n
  		i++
  	}
  	sort.Strings(names)
  	for _, n := range names {
  		if err := it(a.MediaTypes[n]); err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // IterateMediaTypes calls the given iterator passing in each media type sorted in alphabetical order.
  // Iteration stops if an iterator returns an error and in this case IterateMediaTypes returns that
  // error.