openapi-generator-cli icon indicating copy to clipboard operation
openapi-generator-cli copied to clipboard

[BUG] Allow support for OpenAPI Generator snapshot versions through the openapitools.json file

Open dbrils opened this issue 4 years ago • 2 comments

🐛 Bug Report:

Describe the bug

I would like to use the 6.0.0-SNAPSHOT version of the OpenAPI generator package while using the openapitools.json configuration file.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Adjust the openapitools.json configuration file to use the snapshot version:

{ "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { "version": "6.0.0-SNAPSHOT", "generators": { "client": { "generatorName": "typescript-angular", "glob": "openapi.yaml", "output": "src/app/api" } } } }

  1. Attempt to generate a client using the configuration using npx openapi-generator-cli generate or whatever current script you have in place.
  2. View the output in the cli:

image

  1. See error

Expected behavior

I hoped that I would be able to use a snapshot version of the openapi-generator library. Unfortunately that does not seem to be the case. Perhaps I need to adjust my configuration, but I can't find the documentation for using snapshot versions, only for creating a snapshot version if my client library.

Operation System (please complete the following information):

  • Windows 10 Pro 19042.1526

Package System (please complete the following information):

  • Version 2.4.26

dbrils avatar Feb 23 '22 08:02 dbrils

I am having the same issue. Isn't there a way to use a locally build SNAPSHOT version?

ctron avatar Mar 01 '22 10:03 ctron

You can set downloadUrl:

{
  "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  "spaces": 2,
  "generator-cli": {
    "version": "6.0.0-20220330.230127-109",
    "repository": {
      "downloadUrl": "https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/openapi-generator-cli-${versionName}.jar"
    }
  }
}

A77AY avatar Mar 31 '22 22:03 A77AY