go-swagger toolkit

Swagger 2.0 describes your API's for you, so you don't have to

Generate an API client

generate usage

The toolkit has a command that will let you generate a client. Usage To generate a client: swagger generate client -f [http-url|filepath] -A [application-name] [--principal [principal-name]] Use a default client, which has an HTTP transport: import ( "log" "github.com/myproject/client/operations" "github.com/go-swagger/go-swagger/strfmt" "github.com/go-swagger/go-swagger/spec" apiclient "github.com/myproject/client" httptransport "github.com/go-swagger/go-swagger/httpkit/client" ) func main() { // create the API client client := apiclient.NewHTTPClient(nil) // make the request to get all items resp, err := client.Operations.All(operations.AllParams{}) if

23 Oct 2015 #generate