|
| 1 | +# Contributing guide |
| 2 | + |
| 3 | +**Want to contribute? Great!** We try to make it easy, and all contributions, even the smaller ones, are more than welcome. This includes bug reports, fixes, documentation, examples... But first, read this page. |
| 4 | + |
| 5 | +## Reporting an issue |
| 6 | + |
| 7 | +This project uses GitHub issues to manage the issues. Open an issue directly in GitHub. |
| 8 | + |
| 9 | +If you believe you found a bug, and it's likely possible, please indicate a way to reproduce it, what you are seeing, and |
| 10 | +what you would expect to see. Don't forget to indicate your Quarkus, Java, Maven/Gradle, and GraalVM versions. |
| 11 | + |
| 12 | +## Tests and documentation are not optional |
| 13 | + |
| 14 | +Don't forget to include tests in your pull requests. Also don't forget the documentation (reference documentation, javadoc...). |
| 15 | + |
| 16 | +### RESTEasy Reactive and RESTEasy Classic |
| 17 | + |
| 18 | +This extension supports RESTEasy Reactive and RESTEasy Classic. We have one profile for each implementation. By default, tests are run with RESTEasy Classic. |
| 19 | + |
| 20 | +#### Using the RESTEasy Reactive profile |
| 21 | + |
| 22 | +To run the tests using RESTEasy Reactive, use the `resteasy-reactive` [profile](https://github.com/quarkiverse/quarkus-openapi-generator/blob/32d9bd753724065d7217defb3085a734fea40bc8/integration-tests/pom.xml#L79), like the following: |
| 23 | + |
| 24 | +```shell |
| 25 | +mvn verify -Presteasy-reactive |
| 26 | +``` |
| 27 | + |
| 28 | +#### Using the RESTEasy Classic profile |
| 29 | + |
| 30 | +To run the tests using RESTEasy Classic, use the `resteasy-classic` [profile](https://github.com/quarkiverse/quarkus-openapi-generator/blob/32d9bd753724065d7217defb3085a734fea40bc8/integration-tests/pom.xml#L49), like the following: |
| 31 | + |
| 32 | +```shell |
| 33 | +mvn verify -Presteasy-classic |
| 34 | +``` |
| 35 | + |
| 36 | +#### Specific tests for each implementation |
| 37 | + |
| 38 | +Most of the tests are the same for both RESTEasy implementations, but a few of them require different code, like the `multipart-request` [integration test](https://github.com/quarkiverse/quarkus-openapi-generator/tree/main/integration-tests/multipart-request). For these cases, we have one test for each implementation, using the `org.junit.jupiter.api.Tag` annotation to specify the profile for each of them. |
| 39 | + |
| 40 | +### Code Style |
| 41 | + |
| 42 | +Maven automatically formats code and organizes imports when you run `mvn verify`. So, we recommend you do that before sending your PR. Otherwise, PR checks will fail. |
| 43 | + |
| 44 | +## Quarkus 3 and Quarkus 2 support |
| 45 | + |
| 46 | +This extension supports versions 3 and 2 of Quarkus and the code base is different for each Quarkus version. Therefore, we have the `main` branch supporting Quarkus 3, and the `quarkus2` branch supporting Quarkus 2. Preferably send your PRs to the `main` branch and [we will backport them to the `quarkus2` branch](#backporting-between-branches). |
| 47 | + |
| 48 | +## For the maintainers |
| 49 | + |
| 50 | +### Backporting between branches |
| 51 | + |
| 52 | +[We have a GitHub action for backporting PRs between different branches](.github/workflows/pr-backporting.yml). To use that, you must set a label named `backport-<destination_branch_name>`. |
| 53 | + |
| 54 | +Let's say you want to backport a PR from the `main` branch to the `quarkus2` branch. You would have to add a label named `backport-quarkus2` to the original PR. When that PR is merged, the GitHub actions bot will send a copy of the PR to the `quarkus2` branch. |
| 55 | + |
| 56 | +See an example: |
| 57 | + |
| 58 | +* [Original PR](https://github.com/quarkiverse/quarkus-openapi-generator/pull/439) |
| 59 | +* [Backport PR](https://github.com/quarkiverse/quarkus-openapi-generator/pull/445) |
| 60 | + |
| 61 | +#### Known limitation |
| 62 | + |
| 63 | +GitHub does not initiate checks for pull requests opened by the GitHub Actions bot. Therefore, [when we backport a PR to another branch the PR checks are not run automatically](https://github.com/quarkiverse/quarkus-openapi-generator/issues/450). |
| 64 | + |
| 65 | +### Backlog |
| 66 | + |
| 67 | +We have a [Kanban board](https://github.com/orgs/quarkiverse/projects/2), which is currently visible only by members of the [Quarkiverse organization](https://github.com/quarkiverse). |
| 68 | + |
| 69 | +### Staling issues and PRs |
| 70 | + |
| 71 | +We have a [GitHub action to automatically close issues and PRs](.github/workflows/stale_issues.yml) that didn't have interactions for a while. If you want to disable it for a specific issue or PR, you can add the `pinned` label and it will never stale. |
0 commit comments