gulp-mson-to-json-schema
v1.1.1
Published
Generate JSON Schema files from API Blueprint’s MSON
Downloads
11
Maintainers
Readme
gulp-mson-to-json-schema
- Pipe in API Blueprint files with Data Structures
- Parse the MSON with protagonist
- Convert to JSON Schema draft v4 from the resulting AST with boutique
- Optionally include JSON files with sample values for use in mocking, docs, etc.
- Enjoy designing your schema in Markdown!
install
$ npm install gulp-mson-to-json --save-dev
pipe
options
samples
set totrue
to include schema conformant JSON files, populated with MSON sample values
/gulpfile.js
var gulp = require('gulp');
var MSONtoJSON = require('gulp-markdown-to-json-schema');
gulp.task('schema', function(){
return gulp.src('./schema/**/*.md')
.pipe(MSONtoJSON())
.pipe(gulp.dest('./schema/json'));
});
JSON output comes from boutique as a string. Pipe in gulp-beautify for beautiful, readable files.
MIT LICENSE copyright © 2015 Push the Red Button.