Mongoose Schema JSON Schema Generator

JSON →
library 4.0.1 ·javascript
verified May 27, 2026

This package extends Mongoose's core classes (`Schema`, `Model`, and `Query`) to automatically generate JSON Schema representations from existing Mongoose definitions. It provides a `jsonSchema()` method accessible directly on Mongoose schemas, models, and queries, streamlining the creation of JSON Schemas for API documentation (e.g., OpenAPI), data validation, or UI generation. The current stable version is 4.0.1, indicating active maintenance and compatibility with Mongoose versions 6.x through 9.x. Key differentiators include its direct integration into Mongoose prototypes, a caching mechanism for built schemas with an explicit `forceRebuild` option, and configurable mapping for custom Mongoose field options to JSON Schema extensions (`fieldOptionsMapping`). The package typically releases new versions as needed to support newer Mongoose versions or JSON Schema specification updates.

total hits 15
actors 8 distinct systems
last hit 6d ago MetaBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany