README
Ponzi
We needed a quick way to generate schema's for objects so that ETL's further down the pipe would know how to parse the darn things.
usage
var Ponzi = require('ponzi');
var schema = Ponzi.toSchema({ aString : 'abc',
aNumber : 123,
anObject : { hello : 'world'},
anArray : [1, 2, 3] });
<!-- yields
{ type: 'object',
properties:
{ aNumber: { type: 'number' },
aString: { type: 'string' },
anArray: { type: 'array', items: [Object] },
anObject:
{ type: 'object',
'$ref': '211b43b6a3324ea9dd280dfb567fedb8' } },
definitions: { '211b43b6a3324ea9dd280dfb567fedb8': { type: 'object', properties: [Object] } } } -->
known bummers
Arrays containing different datatypes will yield little information. ie) type : 'mixed' (which is not super helpful);