@bedrockio/model 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -117,7 +117,7 @@ function applyValidation(schema, definition) {
117
117
 
118
118
  // Yada schemas
119
119
 
120
- function getSchemaFromMongoose(schema, options) {
120
+ function getSchemaFromMongoose(schema, options = {}) {
121
121
  let {
122
122
  obj
123
123
  } = schema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrockio/model",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Bedrock utilities for model creation.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/validation.js CHANGED
@@ -129,7 +129,7 @@ export function applyValidation(schema, definition) {
129
129
 
130
130
  // Yada schemas
131
131
 
132
- function getSchemaFromMongoose(schema, options) {
132
+ function getSchemaFromMongoose(schema, options = {}) {
133
133
  let { obj } = schema;
134
134
  if (options.stripReserved) {
135
135
  obj = omit(obj, RESERVED_FIELDS);