UNPKG

@benshi.ai/js-sdk

Version:

Benshi SDK

16 lines (10 loc) 404 B
import yaml from 'js-yaml' import stringify from 'json-stringify-pretty-compact' const convert = () => { const schemaPath = `${__dirname}/../../internal-definition/schema/ingest_schema.yml` const ymlSchema = fs.readFileSync(schemaPath, 'utf8') schema = yaml.load(ymlSchema) console.log(schema) fs.writeFileSync('./ingest_schema.json', stringify(schema)) } export default convert