Contributions are welcome!
The go-client is an netlify/open-api derived http client generated using go-swagger. It uses go modules. To work on it please ensure the following:
- You are running at least Go 1.12
- You have cloned this repo OUTSIDE of the go path. (So go modules work).
- You have a $GOPATH set up and $GOPATH/bin is added to your $PATH
See GMBE:Tools as dependencies and GMBE:Using gobin
to install/run tools for a deeper explanation of how a tools.go file works.
All spec changes must pass go-swagger spec validation.
You can run this command to validate the spec:
make validate
Always validate after making changes to the swagger.yml
file.
The Go client must be regenerated after every change to the swagger.yml
.
You can use this command to generate the Go client:
make generate
You may first want to edit swagger.yml to add your field or endpoint definitions.
- Don't bump the version number for
swagger.yml
changes. Do that during the release process. - Ensure
make validate
passes. - The go tests run against the last generated go client. These must pass before making a release.
- If all you want is a new endpoint, you can PR just the
swagger.yml
changes for review and regenerate the go client when its ready to go in.
- Make sure you are on the HEAD of the master branch.
- regenarate go client (if you haven't) (Make all and commit the results)
- bump a JS package version with
npm version [major|minor|patch]
(updates package.json, swagger.yaml and create a git tag) - Run
npm publish
which will asgit push && git push --tags
to push to the origin, create a github release and publish the spec to npm.
By contributing to Netlify Node Client, you agree that your contributions will be licensed under its MIT license.