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 9557a91 commit 62ece50
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 62ece50

Please sign in to comment.