@openapitools/openapi-generator-cli 2.13.4 → 2.13.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +44 -6
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -10,7 +10,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
10
10
  configuration automatically given an OpenAPI Spec (both 2.0 and 3.0 are supported). Please see
11
11
  [OpenAPITools/openapi-generator](https://github.com/OpenAPITools/openapi-generator).
12
12
 
13
- The OpenAPI Generator is a Java project. `openapi-generator-cli` will download the appropriate JAR file and invoke the `java` executable to run the OpenAPI Generator. You must have the `java` binary executable available on your `PATH` for this to work.
13
+ The OpenAPI Generator is a Java project. `openapi-generator-cli` will download the appropriate JAR file and invoke the `java` executable to run the OpenAPI Generator. You must have the `java` binary executable available on your `PATH` for this to work. (JDK 11 is the minimal version supported. To install OpenJDK, please visit https://adoptium.net/)
14
14
 
15
15
  If you find this tool useful, please consider sponsoring this project financially via https://opencollective.com/openapi_generator or directly to [Kay Schecker](https://github.com/sponsors/kay-schecker) (the author of this tool) :pray:
16
16
 
@@ -115,7 +115,7 @@ Initially the file has the following content:
115
115
  "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
116
116
  "spaces": 2,
117
117
  "generator-cli": {
118
- "version": "4.3.1" // or the current latest version ;)
118
+ "version": "7.8.0" // or the current latest version ;)
119
119
  }
120
120
  }
121
121
  ```
@@ -124,7 +124,7 @@ This configuration indicates the following:
124
124
 
125
125
  - the json file shall be formatted using **2 spaces**
126
126
  - the jar files shall be downloaded to *./my/custom/storage/dir*
127
- - the generator-cli version 4.3.1 is used
127
+ - the generator-cli version 7.8.0 is used
128
128
 
129
129
  Further it is also possible to configure generators, for example:
130
130
 
@@ -133,7 +133,7 @@ Further it is also possible to configure generators, for example:
133
133
  "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
134
134
  "spaces": 2,
135
135
  "generator-cli": {
136
- "version": "4.3.1",
136
+ "version": "7.8.0",
137
137
  "storageDir": "~/my/custom/storage/dir", // optional
138
138
  "generators": { // optional
139
139
  "v2.0": { // any name you like (just printed to the console log or reference it using --generator-key)
@@ -185,7 +185,7 @@ If you're using a private maven registry you can configure the `downloadUrl` and
185
185
  "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
186
186
  "spaces": 2,
187
187
  "generator-cli": {
188
- "version": "5.3.0",
188
+ "version": "7.8.0",
189
189
  "repository": {
190
190
  "queryUrl": "https://private.maven.intern/solrsearch/select?q=g:${group.id}+AND+a:${artifact.id}&core=gav&start=0&rows=200",
191
191
  "downloadUrl": "https://private.maven.intern/maven2/${groupId}/${artifactId}/${versionName}/${artifactId}-${versionName}.jar"
@@ -196,6 +196,44 @@ If you're using a private maven registry you can configure the `downloadUrl` and
196
196
 
197
197
  If the `version` property param is set it is not necessary to configure the `queryUrl`.
198
198
 
199
+ ### Use locally built JAR
200
+ 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.
201
+ E.g.:
202
+ ```sh
203
+ cd openapi-generator
204
+ ./mvnw clean package
205
+ cp ./modules/openapi-generator-cli/target/openapi-generator-cli.jar /your/project/node_modules/@openapitools/openapi-generator-cli/versions/my-local-snapshot.jar
206
+ ```
207
+ and then:
208
+ ```json
209
+ {
210
+ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
211
+ "spaces": 2,
212
+ "generator-cli": {
213
+ "version": "my-local-snapshot",
214
+ }
215
+ }
216
+ ```
217
+
218
+ ### Use nightly `SNAPSHOT` build
219
+ Change your `openapitools.json` to:
220
+
221
+ ```json
222
+ {
223
+ "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
224
+ "spaces": 2,
225
+ "generator-cli": {
226
+ "version": "7.9.0-20240829.123431-22",
227
+ "repository": {
228
+ "downloadUrl": "https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.9.0-SNAPSHOT/openapi-generator-cli-${versionName}.jar"
229
+ }
230
+ }
231
+ }
232
+ ```
233
+
234
+ Example is with a snapshot of `7.9.0`, please change the `version` and `downloadUrl` accordingly.
235
+ You can find all snapshots [here](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/).
236
+
199
237
  ## Run specific generators
200
238
 
201
239
  | cmd | v3.0 runs | v2.0 runs |
@@ -231,7 +269,7 @@ more information about the possible arguments and a detailed usage manual of the
231
269
 
232
270
  ```sh
233
271
  npm install @openapitools/openapi-generator-cli@previous
234
- npm i @openapitools/openapi-generator-cli@1.0.18-4.3.1
272
+ npm i @openapitools/openapi-generator-cli@1.0.18-4.3.1
235
273
  ```
236
274
 
237
275
  or using yarn
package/package.json CHANGED
@@ -51,7 +51,7 @@
51
51
  "text": "Please sponsor OpenAPI Generator."
52
52
  }
53
53
  },
54
- "version": "2.13.4",
54
+ "version": "2.13.6",
55
55
  "name": "@openapitools/openapi-generator-cli",
56
56
  "description": "A npm package wrapper for OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator), generates which API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)",
57
57
  "scripts": {
@@ -66,11 +66,11 @@
66
66
  "main.js"
67
67
  ],
68
68
  "dependencies": {
69
- "@nestjs/axios": "3.0.2",
69
+ "@nestjs/axios": "3.0.3",
70
70
  "@nestjs/common": "10.3.0",
71
71
  "@nestjs/core": "10.3.0",
72
72
  "@nuxtjs/opencollective": "0.3.2",
73
- "axios": "1.6.8",
73
+ "axios": "1.7.4",
74
74
  "chalk": "4.1.2",
75
75
  "commander": "8.3.0",
76
76
  "compare-versions": "4.1.4",