Our project uses multiple swagger files for a single API, yet it appears swagger-codegen only accepts one. How do we generate code with swagger-codegen in this case?
You can use relative schema file. e.g.
$ref: 'Pet.yaml'
Ref: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#relative-schema-file-example
If the swagger files are not linked/related to each other, then you will need to combine the swagger files into a single file and use tags
to classify the operations. e.g.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With