tur
v0.0.1
Published
Create a composed YAML file using $include tag.
Downloads
14
Readme
Yamlinc
Create a composed YAML file using $include tag.
Simple usage
- Install global tur command-line utility
$ npm install tur -g
- Create "my_swagger_doc.yml" and split it into multiple file
## file: my_swagger_doc.yml
version: '2.0'
$include: ./tags.yml
$include: ./paths.yml
## file: tags.yml
tags:
- FirstTag
- SecondTag
## file: paths.yml
paths:
/api/me:
get: ...
/api/you:
post: ...
$include: others-paths.yml
## file: others-paths.yml
/api/other/one:
get: ...
/api/other/two:
post: ...
- Simply compile the entry point 'my_swagger_doc.yml'
$ tur my_swagger_doc.yml
- Get your compiled file 'my_swagger_doc.inc.yml'
NOTICE: Ymalinc append '*.inc.yml' extension to compiled file.
Develompment watcher
During development you need costantily updated compiled file by watching changes of dependences
$ tur --watch spectacle -d my_swagger_doc.yml