mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
22 lines
412 B
JavaScript
22 lines
412 B
JavaScript
|
'use strict';
|
||
|
|
||
|
module.exports = function defFunc(ajv) {
|
||
|
defFunc.definition = {
|
||
|
type: 'object',
|
||
|
inline: require('./dotjs/patternRequired'),
|
||
|
statements: true,
|
||
|
errors: 'full',
|
||
|
metaSchema: {
|
||
|
type: 'array',
|
||
|
items: {
|
||
|
type: 'string',
|
||
|
format: 'regex'
|
||
|
},
|
||
|
uniqueItems: true
|
||
|
}
|
||
|
};
|
||
|
|
||
|
ajv.addKeyword('patternRequired', defFunc.definition);
|
||
|
return ajv;
|
||
|
};
|