To install dependencies of the above script:
npm install yaml
Usage:
parameters: <inputdir> <outputfile> [--help]
--help generates this message.
<inputdir> a directory containing individual yml files in a swagger structure.
<outputfile> a directory containing the merged swagger yml files.
Requirements for the input directory:
- should contain a ./root.yml file
- schema's should be stored in ./components/schemas
- paths should be stored in ./paths
You can create as many subfolders within those schemas and paths folders as you like. The files will all be merged together regardless of their level (as if they would all be directly in ./components/schemas or ./paths
Enjoy.