A quicktype library that generates Azure DB Static Schemas for Node from JSON.
Example input (newtable.json
):
{
"text": "Example",
"complete": true
}
newtable.columns = {
"text": "string",
"complete": "boolean"
};
Because of the way this library was built, it is nearly as flexible as quicktype
. Here is an example:
npm start -- "example/comment.json" --top-level NewTableName
I was working with Azure Mobile App Easy Tables recently, and I learned a new kind of Node schema for backends. Wanting to use quicktype
to write my data models once for the client and server, I didn't find anything that satisfies these requirements. I'm not sure what to call this format, but the format really isn't picky, so I built this "language".
It has only been designed for the most basic types, so if you find a useful one that outputting incorrectly (or causes an error to be thrown) please file a GitHub issue, or feel free to contribute a new feature!
npm install
ts-node example/app.ts example/comment.json