You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CONTRIBUTING.md 3.6 KiB

7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ## Contributing to Swagger-UI
  2. We love contributions from our community of users! This document explains our guidelines and workflows. Please take care to follow them, as it helps us keep things moving smoothly.
  3. #### Environment setup
  4. 0. Install Node.js (4 or newer) and npm (3 or newer).
  5. 1. Make a fork of Swagger-UI on GitHub, then clone your fork to your machine.
  6. 2. Run `npm install` in your Swagger-UI directory.
  7. 3. Run `npm run dev`. `localhost:3200` should open automatically.
  8. 4. You're ready to go!
  9. #### Branching model
  10. Feature branches should be prefixed with `ft/`.
  11. Bugfix branches should be prefixed with `bug/`.
  12. Version branches should be prefixed with `v/`.
  13. After the forward slash, include a short description of what you're fixing. For example: `bug/fix-everything-that-was-broken`. For versions, add the version that will be released via the branch, for example: `v/1.2.3`.
  14. If there's an issue filed that you're addressing in your branch, include the issue number directly after the forward slash. For example: `bug/1234-fix-all-the-other-things`.
  15. #### Filing issues
  16. - **Do** include the Swagger-UI build you're using - you can find this by opening your console and checking `window.versions.swaggerUi`
  17. - **Do** include a spec that demonstrates the issue you're experiencing.
  18. - **Do** include screenshots, if needed. GIFs are even better!
  19. - **Do** place code inside of a pre-formatted container by surrounding the code with triple backticks.
  20. - **Don't** open tickets discussing issues with the Swagger/OpenAPI specification itself, or for issues with projects that use Swagger-UI.
  21. - **Don't** open an issue without searching the issue tracker for duplicates first.
  22. #### Committing
  23. - Break your commits into logical atomic units. Well-segmented commits make it _much_ easier for others to step through your changes.
  24. - Limit your subject (first) line to 50 characters (GitHub truncates more than 70).
  25. - Provide a body if you'd like to explain your commit in detail.
  26. - Capitalize the beginning of your subject line, and do not end the subject line with a period.
  27. - Your subject line should complete this sentence: `If applied, this commit will [your subject line].`
  28. - Don't use [magic GitHub words](https://help.github.com/articles/closing-issues-using-keywords/) in your commits to close issues - do that in the pull request for your code instead.
  29. _Adapted from [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/#seven-rules)._
  30. #### Making pull requests
  31. - **Do** summarize your changes in the PR body. If in doubt, write a bullet-point list titled `This PR does the following:`.
  32. - **Do** include references to issues that your PR solves, and use [magic GitHub words](https://help.github.com/articles/closing-issues-using-keywords/) to close those issues automatically when your PR is merged.
  33. - **Do** include tests that cover new or changed functionality.
  34. - **Do** be careful to follow our ESLint style rules. We recommend installing an ESLint plugin if you use a graphical code editor.
  35. - **Do** make sure that tests and the linter are passing by running `npm test` locally, otherwise we can't merge your pull request.
  36. - **Don't** include any changes to files in the `dist/` directory - we update those files only during releases.
  37. - **Don't** mention maintainers in your original PR body - we probably would've seen it anyway, so it just increases the noise in our inboxes. Do feel free to ping maintainers if a week has passed and you've heard nothing from us.
  38. - **Don't** open PRs for custom functionality that only serves a small subset of our users - custom functionality should be implemented outside of our codebase, via a plugin.