Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: OpenAPITools/openapi-generator-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d04de5023a7fc10132524c5b80d1ce44e144665e
Choose a base ref
..
head repository: OpenAPITools/openapi-generator-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 02801b8846cc44eb53250cfa8b0f1bc97c8afc2b
Choose a head ref
Showing with 38 additions and 0 deletions.
  1. +38 −0 apps/generator-cli/src/README.md
38 changes: 38 additions & 0 deletions apps/generator-cli/src/README.md
Original file line number Diff line number Diff line change
@@ -196,6 +196,44 @@ If you're using a private maven registry you can configure the `downloadUrl` and

If the `version` property param is set it is not necessary to configure the `queryUrl`.

### 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` the [OpenAPITools/openapi-generator](https://github.com/OpenAPITools/openapi-generator) 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 find all snapshots [here](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/).

## Run specific generators

| cmd | v3.0 runs | v2.0 runs |