0.1.2-dev • Published 5 years ago

ischema-ts v0.1.2-dev

Weekly downloads
3
License
MIT
Repository
-
Last release
5 years ago

ischema

A TypeScript interface parser for generating JSON schemas.

Usage

Install for CLI: yarn global add ischema-ts | npm i ischema-ts -g Run: ischema for current directory, or ischema path/to/directory/

Mark interfaces for transpilation by wrapping them with: /* SCHEMA */ and /* END SCHEMA */.

Example:

/* SCHEMA */
interface ITest {
	[key: string]: any;
}
/* END SCHEMA */

Options

Create an ischema.json file in the root you will be running ischema in.

{
	"options": {
		"rootDir": ".",
		"outDir": "./schemas"
	}
}

Use ischema --init or ischema --init path/to/folder to create this file for you.

Known Issues

  • Issues parsing function types properly.
  • Does not conform types to JSON strict types (yet).
0.1.2-dev

5 years ago

0.1.1-dev

5 years ago

0.1.0-dev

5 years ago