Skip to content

Commit dc96d64

Browse files
authored
docs: add instruction for building the binary (OpenAPITools#18473)
1 parent 1d67d06 commit dc96d64

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

CONTRIBUTING.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Please file the pull request against the correct branch, e.g. `master` for non-b
3131

3232
All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)
3333

34-
If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.
34+
If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.
3535

3636
### Templates
3737

@@ -84,6 +84,26 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master
8484
- For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit`
8585
- For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page.
8686

87+
### Building
88+
89+
The `openapi-generator-cli` can be built using the following command. This will generate the `openapi-generator-cli.jar` in the `modules/openapi-generator-cli/target` directory without running the tests and generating the Javadocs.
90+
91+
```shell
92+
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
93+
```
94+
95+
Or on Windows:
96+
97+
```shell
98+
mvnw.cmd clean install -DskipTests -Dmaven.javadoc.skip=true
99+
```
100+
101+
The binary can run via `java -jar`. For example:
102+
103+
```shell
104+
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help
105+
```
106+
87107
### Testing
88108

89109
To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen)
@@ -112,5 +132,5 @@ See [OpenAPI Tools wiki](https://github.com/OpenAPITools/openapi-generator/wiki/
112132
- File a PR with meaningful title, description and commit messages
113133
- Make sure the option "Allow edits from maintainers" in the PR is selected so that the maintainers can update your PRs with minor fixes, if needed.
114134
- Recommended git settings
115-
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
135+
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
116136
- To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))

0 commit comments

Comments
 (0)