sashay -u http://petstore.swagger.wordnik.com/api/api-docs -p petstore > petstore.go
will generate a Go library called "petstore" which can be imported and used to interact with the Swagger sample application. Use this generated library like this;
package main import "petstore" func main() { pet, err := petstore.GetPetById(33) if err != nil { log.Println("error fetching pet:", err.Error()) return } log.Println("Pet's name is", pet.Name) }
I'm releasing it early and unfinished in the hopes that it will remove some boilerplate effort for somebody and thereby prove useful even if it fails to completely remove the need to write code for interacting with services. Feel free to file bugs here.
Cheers,
--- SER