docs: link to existing documentation for snapshot builds and locally built JARs (#19544)

Follow-up from https://github.com/OpenAPITools/openapi-generator/pull/19497 since https://github.com/OpenAPITools/openapi-generator-cli/pull/794 has been merged.
This commit is contained in:
Joscha Feth 2024-09-07 09:12:24 +01:00 committed by GitHub
parent 195438d1e7
commit 14e691b9c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -447,41 +447,7 @@ npm install @openapitools/openapi-generator-cli -D
```
<!-- /RELEASE_VERSION -->
#### Use locally built JAR
In order to use a locally built jar of the generator CLI, you can copy the jar from your local build (i.e. if you were to `build` this repository it would be in `~/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar`) into `./node_modules/@openapitools/openapi-generator-cli/versions/` and change the `version` in the `openapitools.json` file to the base name of the jar file.
E.g.:
```sh
cd openapi-generator
./mvnw clean package
cp ./modules/openapi-generator-cli/target/openapi-generator-cli.jar /your/project/node_modules/@openapitools/openapi-generator-cli/versions/my-local-snapshot.jar
```
and then:
```json
{
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "my-local-snapshot",
}
}
```
#### Use nightly `SNAPSHOT` build
Change your `openapitools.json` to:
```json
{
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.9.0-20240829.123431-22",
"repository": {
"downloadUrl": "https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.9.0-SNAPSHOT/openapi-generator-cli-${versionName}.jar"
}
}
}
```
(example is with a snapshot of `7.9.0`, please change the `version` and `downloadUrl` accordingly)
You can use [locally built JARs](https://github.com/OpenAPITools/openapi-generator-cli?tab=readme-ov-file#use-locally-built-jar) or [`SNAPSHOT` versions](https://github.com/OpenAPITools/openapi-generator-cli?tab=readme-ov-file#use-nightly-snapshot-build) as well.
## [2 - Getting Started](#table-of-contents)