Skip to content

Commit be618ec

Browse files
authored
docs: add hints about how to use snapshot version of generator-cli (OpenAPITools#19497)
* docs: add hints about how to use snapshot version of `generator-cli` * docs: simplify * style: indentation
1 parent 7510e6b commit be618ec

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

+38-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
128128

129129
| OpenAPI Generator Version | Release Date | Notes |
130130
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
131-
| 7.9.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.8.0-SNAPSHOT/) | 23.09.2024 | Minor release with breaking changes (with fallback) |
131+
| 7.9.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.9.0-SNAPSHOT/) | 23.09.2024 | Minor release with breaking changes (with fallback) |
132132
| [7.8.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.8.0) (latest stable release) | 19.08.2024 | Minor release with breaking changes (with fallback) |
133133
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
134134
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
@@ -445,6 +445,43 @@ Or install it as dev-dependency:
445445
npm install @openapitools/openapi-generator-cli -D
446446
```
447447
<!-- /RELEASE_VERSION -->
448+
449+
#### Use locally built JAR
450+
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.
451+
E.g.:
452+
```sh
453+
cd openapi-generator
454+
./mvnw clean package
455+
cp ./modules/openapi-generator-cli/target/openapi-generator-cli.jar /your/project/node_modules/@openapitools/openapi-generator-cli/versions/my-local-snapshot.jar
456+
```
457+
and then:
458+
```json
459+
{
460+
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
461+
"spaces": 2,
462+
"generator-cli": {
463+
"version": "my-local-snapshot",
464+
}
465+
}
466+
```
467+
468+
#### Use nightly `SNAPSHOT` build
469+
Change your `openapitools.json` to:
470+
471+
```json
472+
{
473+
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
474+
"spaces": 2,
475+
"generator-cli": {
476+
"version": "7.9.0-20240829.123431-22",
477+
"repository": {
478+
"downloadUrl": "https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.9.0-SNAPSHOT/openapi-generator-cli-${versionName}.jar"
479+
}
480+
}
481+
}
482+
```
483+
(example is with a snapshot of `7.9.0`, please change the `version` and `downloadUrl` accordingly)
484+
448485
## [2 - Getting Started](#table-of-contents)
449486

450487
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml), please run the following

0 commit comments

Comments
 (0)