tsoa
This commit is contained in:
49
node_modules/@hapi/validate/lib/schemas.js
generated
vendored
Executable file
49
node_modules/@hapi/validate/lib/schemas.js
generated
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
'use strict';
|
||||
|
||||
const Joi = require('./index');
|
||||
|
||||
|
||||
const internals = {};
|
||||
|
||||
|
||||
// Preferences
|
||||
|
||||
internals.wrap = Joi.string()
|
||||
.min(1)
|
||||
.max(2)
|
||||
.allow(false);
|
||||
|
||||
|
||||
exports.preferences = Joi.object({
|
||||
allowUnknown: Joi.boolean(),
|
||||
abortEarly: Joi.boolean(),
|
||||
context: Joi.object(),
|
||||
convert: Joi.boolean(),
|
||||
dateFormat: Joi.valid('date', 'iso', 'string', 'time', 'utc'),
|
||||
errors: {
|
||||
escapeHtml: Joi.boolean(),
|
||||
label: Joi.valid('path', 'key', false),
|
||||
language: [
|
||||
Joi.string(),
|
||||
Joi.object().ref()
|
||||
],
|
||||
render: Joi.boolean(),
|
||||
stack: Joi.boolean(),
|
||||
wrap: {
|
||||
label: internals.wrap,
|
||||
array: internals.wrap
|
||||
}
|
||||
},
|
||||
messages: Joi.object(),
|
||||
noDefaults: Joi.boolean(),
|
||||
nonEnumerables: Joi.boolean(),
|
||||
presence: Joi.valid('required', 'optional', 'forbidden'),
|
||||
skipFunctions: Joi.boolean(),
|
||||
stripUnknown: Joi.object({
|
||||
arrays: Joi.boolean(),
|
||||
objects: Joi.boolean()
|
||||
})
|
||||
.or('arrays', 'objects')
|
||||
.allow(true, false)
|
||||
})
|
||||
.strict();
|
||||
Reference in New Issue
Block a user