ischema-ts

0.1.2-dev • Public • Published

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).

Readme

Keywords

none

Package Sidebar

Install

npm i ischema-ts

Weekly Downloads

0

Version

0.1.2-dev

License

MIT

Unpacked Size

45.9 kB

Total Files

9

Last publish

Collaborators

  • envis10n