sashay is an OpenAPI code generator for golang
Update readme to mention Yvasiyarov's Swagger project.
Stupid markdown.  asciidoc FTW.
Pointing people to go-swagger




NOTE: Sashay development has been on hold for a while due to affairs of state. In the meantime, go-swagger has surfaced, supporting Swagger 2.0. I've also been getting a lot of use out of swagger, which provides the other end of the rope by generating a Swagger spec from code and providing a web interface. I recommend that you review these tools if you need Swagger 2.0 rather than holding your breath for me to update Sashay to 2.0.

Sashay is a code generator for the Go programming language. The purpose of Sashay is to make writing programs that interact with RESTful services easier by automating the generation of boilerplate code.

Sashay reads a Swagger v1.2 specification and builds a library for interfacing with that Swagger service, including all defined data types and structures.


go get


If you encounter any compile problems related to dependencies, grab[godep] and use it to build the application.

	go get -d -u
	godep go install .

Tools like godep, gpm, and gvp greatly simplify the care and feeding of Go


	sashay <-f> <-u> <-p>
		-f="": API specification JSON file
		-p="": API package
		-u="": API specification URL

Either -f or -u must be provided, and only one can be. -p must be provided.


	sashay -u -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())
		log.Println("Pet's name is", pet.Name)


This software is released under the BSD Simplified license.  See the included file LICENSE.txt