diff --git a/src/api/transfers/routes.js b/src/api/transfers/routes.js index 9a211082..2f8bad8e 100644 --- a/src/api/transfers/routes.js +++ b/src/api/transfers/routes.js @@ -107,9 +107,9 @@ module.exports = [{ 'fspiop-uri': Joi.string().optional(), 'fspiop-http-method': Joi.string().optional() }).unknown(false).options({ stripUnknown: true }), - params: { + params: Joi.object({ id: Joi.string().required().description('path') - }, + }), payload: Joi.object({ fulfilment: Joi.string().regex(/^[A-Za-z0-9-_]{43}$/).max(48).description('fulfilment of the transfer').label('Invalid transfer fulfilment description.'), completedTimestamp: Joi.string().regex(/^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$/).description('When the transfer was completed').label('A valid transfer completion date must be supplied.'), @@ -147,9 +147,9 @@ module.exports = [{ 'fspiop-uri': Joi.string().optional(), 'fspiop-http-method': Joi.string().optional() }).unknown(false).options({ stripUnknown: true }), - params: { + params: Joi.object({ id: Joi.string().required().description('path') - }, + }), payload: Joi.object({ errorInformation: Joi.object().keys({ errorDescription: Joi.string().required(), @@ -187,9 +187,9 @@ module.exports = [{ 'fspiop-uri': Joi.string().optional(), 'fspiop-http-method': Joi.string().optional() }).unknown(false).options({ stripUnknown: true }), - params: { + params: Joi.object({ id: Joi.string().guid().required().description('path').label('Supply a valid transfer Id to continue.') // To Do : expand user friendly error msg to params as well - } + }) } } }