Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 2.24 KB

CONTRIBUTING.md

File metadata and controls

58 lines (38 loc) · 2.24 KB

CONTRIBUTING

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

Spec validation

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.

Go Client generation

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.

Making PRs

  1. Make sure your PR title and commits follow the conventional commits spec.
  2. Don't bump the version number for swagger.yml changes. The release process handles that.
  3. Ensure make validate passes.
  4. The go tests run against the last generated go client. These must pass before making a release.
  5. 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.

Making a new release

Merge the release PR (auto generated via release-please)

License

By contributing to Netlify Node Client, you agree that your contributions will be licensed under its MIT license.