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

openapi-generator-cli download 5.3.0 every time making it slow to run

Open kpldvnpne opened this issue 2 years ago • 4 comments

In my project, we have the following npm task defined:

"generate": "openapi-generator-cli generate -i ../../../specs/openapi.yaml -g typescript-fetch -o src/api --additional-properties=typescriptThreePlus=true"

Whenever I run the yarn generate command, the following lines get printed to console:

Download 5.3.0 ...
Downloaded 5.3.0

This happens every time I run yarn generate. This downloading takes almost 30 seconds to run -- which is a long time. So, I wanted to make this task skip downloading. How do I do that?

kpldvnpne avatar Mar 08 '22 11:03 kpldvnpne

"schema": "openapi-generator-cli generate -i http://my-api-host/v3/api-docs.yaml -g typescript-axios -o ./src/api/generated", I have the same problem and it keeps showing Download 5.3.0 ... and never works.

wangfulong avatar Jun 08 '22 12:06 wangfulong

ok, I'm in China. I switched VPN from Veee+ to ExpressVPN and it's fine. Can the download source be optimized?

wangfulong avatar Jun 09 '22 03:06 wangfulong

I'm having a similar issue where we are intentionally locking the openapi-generator version in yarn.

It keeps downloading 6.0.0 which is introducing breaking changes in the codegen.

formlogic-robert avatar Jun 09 '22 03:06 formlogic-robert

My workaround - set in openapitools.json storageDir and put 5.3.0.jar in this dir.

wernerdv avatar Mar 09 '23 09:03 wernerdv