Thanks for being willing to contribute!
We appreciate bug reports, feature requests, doc updates, fixing open issues, and other contributions. Please follow our Code Of Conduct and the guide below.
A bug is a recreatable problem that is caused by the code in the repository.
Before submitting bug reports:
- Check if the issue has already been reported
- Recreate the bug — clone
master
and use our bug recreation template forchai-openapi-response-validator
orjest-openapi
.
Feature requests are welcome. Provide clear reasons for why, how, and when you'd use the new feature.
Consider whether your idea fits with the scope and aims of the project. It's up to you to convince the project's developers of the merits of this feature.
- Good PRs are a fantastic help!
- PRs must pass
yarn test:ci
- New code should be consistent with existing code.
- PRs should remain focused in scope and not contain unrelated commits or code changes.
- Please ask before embarking on any significant pull request, to ensure we will want to merge into the project.
- If this is your first pull request for this project, please add yourself as a contributor! Just comment on your pull request:
@all-contributors please add <your-username> for <contribution>
(see example) and the All Contributors bot will raise a PR adding you to the Contributors section of our main README.
Follow this process if you'd like to work on this project:
1. Fork the project, clone your fork, and configure the remotes
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/<repo-name>
# Navigate to the newly cloned directory
cd <repo-name>
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/<upstream-owner>/<repo-name>
git checkout <dev-branch>
git pull upstream <dev-branch>
3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix
git checkout -b <topic-branch-name>
To test changes to a particular package, you can run these from within the package/<packageName>
dir (e.g. package/jest-openapi
):
# run all tests
yarn test
# run all tests, with coverage check
yarn test:coverage
# run all tests, with coverage check, and opens the coverage report in your browser
yarn test:coverage:browse
# run eslint check
yarn lint
# [MUST] run all the above checks
yarn test:ci
To test both packages, run the above from the root dir.
- Use Git's interactive rebase feature to tidy up your commits before making them public.
- We use Husky to run code-quality checks on every commit. This informs you early on if your code is not ready to be saved in Git history. If a commit fails a check, fix the problem then commit again.
git pull [--rebase] upstream <dev-branch>
git push origin <topic-branch-name>