Skip to content

Commit

Permalink
no required values
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoFiora committed Jul 20, 2023
1 parent 7cf7753 commit dace644
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions lib/schemas/common/conditions/conditions.js
Expand Up @@ -59,36 +59,32 @@ const conditionsSchema = {
},
{
if: {
properties: { referenceValue: { const: false } }
not: {
properties: { referenceValue: { const: false } }
}
},
then: {
not: {
properties: {
...conditionsProperties,
referenceValue: {
type: [
'string',
'number',
'boolean',
'object',
'array',
'null'
]
}
},
required: ['referenceValue', 'name']
properties: {
...conditionsProperties,
dynamicValue: {
type: ['string'],
enum: ['date']
}
}
},
else: {
not: {
properties: {
...conditionsProperties,
dynamicValue: {
type: ['string'],
enum: ['date']
}
},
required: ['dynamicValue', 'name']
properties: {
...conditionsProperties,
referenceValue: {
type: [
'string',
'number',
'boolean',
'object',
'array',
'null'
]
}
}
}
}
Expand Down

0 comments on commit dace644

Please sign in to comment.