farrow-json-schema
Tool for Transforming farrow-schema to json schema.
Installation
- npm
- Yarn
npm install farrow-json-schema
yarn add farrow-json-schema
Usage
import { Int, Type } from 'farrow-schema'
const definition = {
[Type]: Int,
}
const jsonSchema = transform(definition)
/**
{
$id: '/farrow/schema',
$ref: '#/definitions/0',
definitions: {
0: {
$id: '0',
type: 'integer',
},
},
}
** /
Api
Type Signature:
const transform: (input: FieldDescriptor) => JSONSchema7;
Learn more
Relative Module
- farrow-schema: Powerful and extensible schema builder library.