joi-to-json
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -22,3 +22,4 @@ const joi = require('joi-12') | ||
retired: joi.boolean().truthy('yes').falsy('no').insensitive(false), | ||
certificate: joi.binary().encoding('base64') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
}) |
@@ -22,3 +22,4 @@ const joi = require('joi-13') | ||
retired: joi.boolean().truthy('yes').falsy('no').insensitive(false), | ||
certificate: joi.binary().encoding('base64') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
}) |
@@ -22,3 +22,4 @@ const joi = require('joi-14') | ||
retired: joi.boolean().truthy('yes').falsy('no').insensitive(false), | ||
certificate: joi.binary().encoding('base64') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
}) |
@@ -22,3 +22,4 @@ const joi = require('joi-15') | ||
retired: joi.boolean().truthy('yes').falsy('no').insensitive(false), | ||
certificate: joi.binary().encoding('base64') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
}) |
@@ -22,3 +22,4 @@ const joi = require('joi-16') | ||
retired: joi.boolean().truthy('yes').falsy('no').sensitive(false), | ||
certificate: joi.binary().encoding('base64') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
}) |
@@ -22,3 +22,4 @@ const joi = require('joi-17') | ||
retired: joi.boolean().truthy('yes').falsy('no').sensitive(false), | ||
certificate: joi.binary().encoding('base64') | ||
certificate: joi.binary().encoding('base64'), | ||
notes: joi.any() | ||
}) |
@@ -114,2 +114,12 @@ { | ||
"format": "binary" | ||
}, | ||
"notes": { | ||
"type": [ | ||
"array", | ||
"boolean", | ||
"number", | ||
"object", | ||
"string", | ||
"null" | ||
] | ||
} | ||
@@ -116,0 +126,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
/* eslint no-use-before-define: "off" */ | ||
/* eslint no-use-before-define: 'off' */ | ||
const _ = require('lodash') | ||
@@ -49,2 +49,3 @@ | ||
this._setAlternativesProperties(schema, joiDescribe) | ||
this._setAnyProperties(schema, joiDescribe) | ||
@@ -298,4 +299,19 @@ return schema | ||
} | ||
_setAnyProperties(schema) { | ||
if (schema.type !== 'any') { | ||
return | ||
} | ||
schema.type = [ | ||
'array', | ||
'boolean', | ||
'number', | ||
'object', | ||
'string', | ||
'null' | ||
] | ||
} | ||
} | ||
module.exports = JoiJsonSchemaParser |
{ | ||
"name": "joi-to-json", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "joi to JSON Schema Converter", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
36089
947