Comments (3)
Hi, I will add support for strict
-option of mongoose-schema (https://mongoosejs.com/docs/guide.html#strict)
In case when strict
equals "throw"
the json schema will get additionalProperties: false
(the same behavior will be repeated for all nested mongoose schemas, but it could be overrided in the nested schema).
It is also possible that the global flag could be added to define default behavior).
from mongoose-schema-jsonschema.
Hi.
Thanks for considering it.
For time being I've forked the repo & implemented this.
from mongoose-schema-jsonschema.
up
from mongoose-schema-jsonschema.
Related Issues (20)
- Add support for "example" field HOT 2
- Fields marked as required using schema.path('x').required(true) are not marked as required. HOT 3
- Add custom options from mongoose schema to json schema HOT 2
- Add support for TypeScript HOT 1
- String minlength and maxlength don't work HOT 1
- 1.4.0 - Error: Cannot find module '../config' HOT 3
- Behaviour of __removeRequired when using selection HOT 4
- Mongoose validators are converted incorrectly HOT 2
- Mongoose "Map" field mapping HOT 2
- Exclude fields using config HOT 4
- Support mongoose 6.0.2 HOT 1
- npm warns mongoose@^5.0.0 required HOT 1
- [Feature Request] Support self reference using definitions HOT 1
- I am not sure how to user custom types HOT 2
- Array of Array is not supported HOT 5
- Usage in NestJS with SchemaFactory.createForClass HOT 1
- Feature Request: Add interface to be more static JsonSchema(mongooseModel) HOT 1
- mongoose schema property 'required' turns to 'true' in json schema if it's declared as a function
- Overriding peer dependency - [email protected] HOT 3
- Using a schema with PatternProperties
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongoose-schema-jsonschema.