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

[Question] How to provide a path to openapitools.json?

Open yurakhomitsky opened this issue 2 years ago • 7 comments

In my project, I'm building two middlewares, for that, I have created two different configs files image

To build middlewares the openapitools.json configs are being copied, built, and removed one by one.

What I'm trying to do is to create an npm command that will build middlewares with the provided path to the openapitools.json

Is it possible to provide a path to the openapitools.json?

yurakhomitsky avatar Apr 18 '22 10:04 yurakhomitsky

Hi @yurakhomitsky , did you find an answer for that? Thanks

jcolladosp avatar Jun 01 '23 14:06 jcolladosp

Is there any update on this?

skopz356 avatar Jul 19 '23 10:07 skopz356

@skopz356 @jcolladosp I did not find a solution. I have tried providing a path to config using "-c" property but no luck.

The other option could be the following: is to move all the generators into a single config and then switch version in the npm command

"scripts": {
    "generate:api": "openapi-generator-cli version-manager set 5.3.0 && openapi-generator-cli generate"
  },

yurakhomitsky avatar Jul 19 '23 15:07 yurakhomitsky

Same issue here, when i provide -c parameter it still creates openapitools.json file in root (where im running command from).

I'd like to execute command from root and configuration have in subfolder. I'm using NX and my configuration is related to one specific module

jchatrny avatar Oct 19 '23 11:10 jchatrny

Same issue here, when i provide -c parameter it still creates openapitools.json file in root (where im running command from).

I'd like to execute command from root and configuration have in subfolder. I'm using NX and my configuration is related to one specific module

Maybe you could go ahead and create bug/feature. I dont think any of the developers have looked at my question

yurakhomitsky avatar Oct 19 '23 13:10 yurakhomitsky

@kay-schecker, @wing328 any ideas?

yurakhomitsky avatar Oct 19 '23 13:10 yurakhomitsky