Client for interacting with the organization api
MacOS, Windows, and Linux
We use https://goswagger.io to generate our Go APIs and clients. This allows us to build our APIs in a "design first" manner.
First we create a swagger.yaml
file that defines the API. Then we run a command
to generate the server code.
Additionally, this allows us to automatically generate client code. The code in this
directory was all generated using the go-swagger
tools.
organization
- the client package that adds convenience methods for common operationsgenclient
- the generated client codemodels
- the generated models
First install the swagger generator. Currently we are using version 0.10.0 of https://github.com/go-swagger/go-swagger.
For mac users:
- brew tap go-swagger/go-swagger
- brew install go-swagger
For windows users:
- See https://github.com/go-swagger/go-swagger for options
The code generator needs a specification file. The specification for the organization API is stored in github.com/3dsim/organization-api/swagger.yaml
. Assuming that project
is cloned as a sibling project, the command to run to generate new client code is:
swagger generate client -A OrganizationAPI -f ../organization-api/swagger.yaml --client-package genclient
- Generate fakes using counterfeiter
go get github.com/maxbrunsfeld/counterfeiter
From inside package folder
go generate
TODO
Organization API | Organization Client |
---|---|
TODO | TODO |
- Tim Sublette
- Ryan Walls
- Chad Queen
- Pete Krull
- Alex Drinkwater
January 2017