joi-to-json
Advanced tools
Comparing version 1.0.1 to 1.1.1
@@ -23,3 +23,4 @@ const joi = require('joi-12') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
notes: joi.any(), | ||
facebookId: joi.string().allow(null) | ||
}) |
@@ -23,3 +23,4 @@ const joi = require('joi-13') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
notes: joi.any(), | ||
facebookId: joi.string().allow(null) | ||
}) |
@@ -23,3 +23,4 @@ const joi = require('joi-14') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
notes: joi.any(), | ||
facebookId: joi.string().allow(null) | ||
}) |
@@ -23,3 +23,4 @@ const joi = require('joi-15') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
notes: joi.any(), | ||
facebookId: joi.string().allow(null) | ||
}) |
@@ -23,3 +23,4 @@ const joi = require('joi-16') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
notes: joi.any(), | ||
facebookId: joi.string().allow(null) | ||
}) |
@@ -23,3 +23,4 @@ const joi = require('joi-17') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
notes: joi.any(), | ||
facebookId: joi.string().allow(null) | ||
}) |
@@ -22,2 +22,5 @@ { | ||
}, | ||
"facebookId": { | ||
"type": ["string", "null"] | ||
}, | ||
"ip": { | ||
@@ -24,0 +27,0 @@ "type": "string", |
@@ -60,2 +60,6 @@ /* eslint no-use-before-define: 'off' */ | ||
} | ||
const enums = _.get(fieldDefn, this.enumFieldName) | ||
if (Array.isArray(enums) && enums.includes(null)) { | ||
return [type, 'null'] | ||
} | ||
return type | ||
@@ -62,0 +66,0 @@ } |
{ | ||
"name": "joi-to-json", | ||
"version": "1.0.1", | ||
"version": "1.1.1", | ||
"description": "joi to JSON Schema Converter", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
36534
960