metarpheus-io-ts
v2.0.0
Published
metarpheus to io-ts
Downloads
525
Keywords
Readme
metarpheus-io-ts
Generate static and runtime (io-ts) domain models interpreting metarpheus output.
Install
npm i metarpheus-io-ts
Usage
metarpheus-io-ts -i path/to/input.json -c path/to/config.json -o path/to/output.ts
Usage from node
import { getModels, getRoutes } from 'metarpheus-io-ts'
const source = ...
const models: string = getModels(source.models, modelsOptions)
const routes: string = getRoutes(source.routes, source.models, routesOptions)