Skip to content

Commit

Permalink
Validate dataMoverTopic based on supportedLifecycleRules
Browse files Browse the repository at this point in the history
Issue: BB-565
  • Loading branch information
KillianG committed Oct 15, 2024
1 parent 5955191 commit a3d8bf8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extensions/replication/ReplicationConfigValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ const joiSchema = joi.object({
bootstrapList: bootstrapListJoi,
},
topic: joi.string().required(),
dataMoverTopic: joi.string().default(''),
dataMoverTopic: joi.string().when('..lifecycle.supportedLifecycleRules', {
is: joi.array().has(joi.string().valid('transition')),
then: joi.required(),
otherwise: joi.forbidden(),
}),
replicationStatusTopic: joi.string().required(),
monitorReplicationFailures: joi.boolean().default(true),
replicationFailedTopic: joi.string().required(),
Expand Down

0 comments on commit a3d8bf8

Please sign in to comment.