Last change
on this file since e29cc2e was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago |
primeNG components
|
-
Property mode
set to
100644
|
File size:
474 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | module.exports = function defFunc(ajv) {
|
---|
4 | defFunc.definition = {
|
---|
5 | type: 'object',
|
---|
6 | macro: function (schema, parentSchema) {
|
---|
7 | if (!schema) return true;
|
---|
8 | var properties = Object.keys(parentSchema.properties);
|
---|
9 | if (properties.length == 0) return true;
|
---|
10 | return {required: properties};
|
---|
11 | },
|
---|
12 | metaSchema: {type: 'boolean'},
|
---|
13 | dependencies: ['properties']
|
---|
14 | };
|
---|
15 |
|
---|
16 | ajv.addKeyword('allRequired', defFunc.definition);
|
---|
17 | return ajv;
|
---|
18 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.