code: func WriteSwaggerDocFunc(kubeTypes []KubeTypes, w io.Writer) error {
  	for _, kubeType := range kubeTypes {
  		structName := kubeType[0].Name
  		kubeType[0].Name = ""
  
  		// Ignore empty documentation
  		docfulTypes := make(KubeTypes, 0, len(kubeType))
  		for _, pair := range kubeType {
  			if pair.Doc != "" {
  				docfulTypes = append(docfulTypes, pair)
  			}
  		}
  
  		if len(docfulTypes) == 0 {
  			continue // If no fields and the struct have documentation, skip the function definition
  		}
  
  		indent := 0
  		buffer := newBuffer()
  
  		writeFuncHeader(buffer, structName, indent)
  		writeMapBody(buffer, docfulTypes, indent)
  		writeFuncFooter(buffer, structName, indent)
  		buffer.addLine("\n", 0)
  
  		if err := buffer.flushLines(w); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // WriteSwaggerDocFunc writes a declaration of a function as a string. This function is used in
  // Swagger as a documentation source for structs and theirs fields