Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Latest commit

 

History

History
17 lines (13 loc) · 427 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 427 Bytes

How to use

import * as refParser from 'json-schema-ref-parser'
import JsonSchemaTypescriptResolver from 'json-schema-typescript-resolver'

refParser.bundle({
    $ref: 'src/users.ts#/definitions/User'
}, { resolve: { ts: new JsonSchemaTypescriptResolver }})

// Or alias
refParser.bundle({
    $ref: '@/users.ts#/definitions/User'
}, { resolve: { ts: new JsonSchemaTypescriptResolver }})

See Options in src/index.ts