swagjs
v1.0.0
Published
Modular Swagger Spec Builder
Downloads
2
Maintainers
Readme
SwagJS
Modular Swagger Spec Builder.
SwagJs enables you to build modular Swagger Documentation.
You can create separate files for paths, models, tags and base configuration.
The example directory contains a sample modularized Swagger Documentation.
Install
npm i swagjs -g
Usage
You can create a Node.js based Swagger Specs Server or generate only a merged spec from your modular documentation.
This library uses files pattern to identify which one is a model definition, a path definition and so on.
You can configure the file pattern the way you like in the command line providing the parameters:
--model-pattern
--path-pattern
Below the available command description.
Help
swagjs --help
swagjs gen --help
swagjs server --help
Merging Modular Spec
# sample
swagjs gen ./specs_root_dir --output=./output_file
Swagger Server With Modular Spec
# sample
server ./specs_root_dir --port=8080
License
This project is available under Apache Public License version 2.0. See LICENSE.