code: func writeFunctions(api *design.APIDefinition, outDir string) ([]string, error) {
  	ctxFile := filepath.Join(outDir, "jsonapi_errors_stringer.go")
  	ctxWr, err := codegen.SourceFileFor(ctxFile)
  	if err != nil {
  		panic(err) // bug
  	}
  	title := fmt.Sprintf("%s: String functions for JSONAPI Errors - See goasupport/jsonapi_errors_stringer/generator.go", api.Context())
  	imports := []*codegen.ImportSpec{
  		codegen.SimpleImport("fmt"),
  		codegen.SimpleImport("github.com/davecgh/go-spew/spew"),
  	}
  	ctxWr.WriteHeader(title, "app", imports)
  	if err := ctxWr.ExecuteTemplate("jsonAPIErrorsStringer", jsonAPIErrorsStringer, nil, nil); err != nil {
  		return nil, err
  	}
  	return []string{ctxFile}, nil
  }
docs: // WriteNames creates the names.txt file.