A library for converting JSON Schema to Mongoose Schema, written in TypeScript. Current stable version is 0.2.2. Release cadence is low (last update likely a few years ago). Key differentiator: single-purpose conversion from JSON Schema to Mongoose, supporting patterns like $ref and default values. Note: requires manual type reference for TypeScript, and uses default export via require.
npm install json-schema-to-mongooseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Converts a JSON Schema with a $ref reference to a Mongoose schema object, using the library's main function.
Add /// <reference path=".../json-schema-to-mongoose.d.ts" /> at the top of your TypeScript file.
Use `import createMongooseSchema = require('json-schema-to-mongoose')` or `const createMongooseSchema = require('json-schema-to-mongoose')`.Pass functions as strings or handle after conversion; library does not evaluate function strings.
Run `npm install json-schema-to-mongoose --save` and ensure import path is correct.
Add `/// <reference path="node_modules/json-schema-to-mongoose/json-schema-to-mongoose.d.ts" />` or install @types if available.
Use `import createMongooseSchema = require('json-schema-to-mongoose')` instead of `import { createMongooseSchema } from '...'`.No dependency data recorded yet.