TOSIT-IO / tdp-ui

Graphical interface for tdp-server
Apache License 2.0
3 stars 2 forks source link

Adapt generator.sh script to support air-gapped environment #194

Closed sergkudinov closed 1 year ago

sergkudinov commented 1 year ago

In air-gapped environment, we manage the openapi-generator-cli-6.2.0.jar file differently. So there is no need for wget to download it.

My suggestion is to add --skip-download option to generate.sh script and an if construction. I would also refactor FORCE_OPENAPI_GEN into cli command option -f/--force to make it look more fancy (similar to setup.sh)

sergkudinov commented 1 year ago

@rpignolet @PaulFarault

rpignolet commented 1 year ago

If the file openapi-generator-cli.jar is already present, the generate.sh script output this:

Downloading https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.0/openapi-generator-cli-6.2.0.jar
File ‘openapi-generator-cli.jar’ already there; not retrieving.
schemas/tdp-server_0.1.0_openapi.json: OK
No schema change. Skipping client generation...
If you want to force client generation, set the variable 'FORCE_OPENAPI_GEN=TRUE'

I think it already works, if the file is present the script will not download it no ?

sergkudinov commented 1 year ago

Indeed, no need for --skip-download, but anyway it needs refactoring.

So, I suggest: