func cleanDescription(doc string) string {
	docBits := strings.Split(doc, "Required security scope")
	doc = docBits[0]
	lines := strings.Split(doc, "\n")
	fullLines := make([]string, len(lines))
	i := 0
	for _, line := range lines {
		if len(line) > 0 && !blankRegexp.MatchString(line) {
			fullLines[i] = line
			i++
		}
	}
	return strings.Join(fullLines[:i], "\n")
}
cleans up description, removing blank lines and extraneous info
package main
import (
	"encoding/json"
	"fmt"
	"mime"
	"regexp"
	"strings"
	"github.com/go-openapi/inflect"
	"github.com/rightscale/rsc/gen"
)
var (
	partsRegexp = regexp.MustCompile("[^[:alnum:]]+")
	blankRegexp = regexp.MustCompile(`^\s*$`)
)
func toGoReturnTypeName(name string, slice bool) string {
	slicePrefix := ""
	if slice {
		slicePrefix = "[]"
	}
	return fmt.Sprintf("%s*%s", slicePrefix, toGoTypeName(name))
}
func toGoTypeName(name string) string {
	switch name {
	case "string":
		return "string"
	case "integer":
		return "int"
	case "boolean":
		return "bool"
	}
	return name
}
func toVarName(name string) string {
	p := partsRegexp.ReplaceAllString(name, "_")
	return inflect.CamelizeDownFirst(p)
}
var toMethodName = inflect.Camelize
var toTypeName = inflect.Camelize
func prettify(o interface{}) string {
	s, err := json.MarshalIndent(o, "", "    ")
	if err != nil {
		return fmt.Sprintf("%+v", o)
	}
	return string(s)
}