2
votes

I am trying to generate nodejs client sdk using https://github.com/swagger-api/swagger-codegen Here is the command I use

swagger-codegen generate -i http://petstore.swagger.io/v2/swagger.json -l javascript -o ./petstore

But for the actual sdk which I need to generate the swagger spec is split in two different json files and I want to create a single sdk for both. How can I do this with Swagger-codegen, using multiple swagger json at same time?

1
Split how? Are they separate definitions, or does one file $ref the other one? - Helen
Hi Helen, they are two different files - Sandy
Hi @Sandy I'm also having similar problem, I need to generete definitions/classes from more then two json input. Any way to achieve this ? - shadowman_93

1 Answers

0
votes

Reuse the --input-spec option (or -i) for every location of the swagger spec, as URL or file.