Sitelet https://web.archive.org/web/20200910214956/https://github.com/sgvictorino/json-to-azure-node-schema
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

json-to-azure-node-schema

npm version

A quicktype library that generates Azure DB Static Schemas for Node from JSON.

Example input (newtable.json):

{
    "text": "Example",
    "complete": true
}

Example output:

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

Background

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!

Example Usage

npm install

ts-node example/app.ts example/comment.json

About

📃 Generate Azure Mobile App Static Table Schemas for Node from JSON (alpha).

Resources

License

Packages

No packages published
You can’t perform that action at this time.