diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 103be9ec..fb778c98 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1993,7 +1993,6 @@ components: required: - projectId - userId - - status - rateType properties: projectId: diff --git a/src/services/JobCandidateService.js b/src/services/JobCandidateService.js index e4d4f92a..0dec8a18 100644 --- a/src/services/JobCandidateService.js +++ b/src/services/JobCandidateService.js @@ -173,9 +173,9 @@ fullyUpdateJobCandidate.schema = Joi.object().keys({ data: Joi.object().keys({ jobId: Joi.string().uuid().required(), userId: Joi.string().uuid().required(), - status: Joi.jobCandidateStatus(), - externalId: Joi.string().allow(null), - resume: Joi.string().uri().allow(null) + status: Joi.jobCandidateStatus().default('open'), + externalId: Joi.string().allow(null).default(null), + resume: Joi.string().uri().allow(null).default(null) }).required() }).required() diff --git a/src/services/JobService.js b/src/services/JobService.js index 9f6fdd80..bea40b45 100644 --- a/src/services/JobService.js +++ b/src/services/JobService.js @@ -252,17 +252,17 @@ fullyUpdateJob.schema = Joi.object().keys({ id: Joi.string().guid().required(), data: Joi.object().keys({ projectId: Joi.number().integer().required(), - externalId: Joi.string().allow(null), - description: Joi.stringAllowEmpty().allow(null), + externalId: Joi.string().allow(null).default(null), + description: Joi.stringAllowEmpty().allow(null).default(null), title: Joi.title().required(), - startDate: Joi.date().allow(null), - duration: Joi.number().integer().min(1).allow(null), + startDate: Joi.date().allow(null).default(null), + duration: Joi.number().integer().min(1).allow(null).default(null), numPositions: Joi.number().integer().min(1).required(), - resourceType: Joi.stringAllowEmpty().allow(null), - rateType: Joi.rateType().allow(null), - workload: Joi.workload().allow(null), + resourceType: Joi.stringAllowEmpty().allow(null).default(null), + rateType: Joi.rateType().allow(null).default(null), + workload: Joi.workload().allow(null).default(null), skills: Joi.array().items(Joi.string().uuid()).required(), - status: Joi.jobStatus() + status: Joi.jobStatus().default('sourcing') }).required() }).required() diff --git a/src/services/ResourceBookingService.js b/src/services/ResourceBookingService.js index a29b3445..120b9539 100644 --- a/src/services/ResourceBookingService.js +++ b/src/services/ResourceBookingService.js @@ -194,13 +194,13 @@ fullyUpdateResourceBooking.schema = Joi.object().keys({ data: Joi.object().keys({ projectId: Joi.number().integer().required(), userId: Joi.string().uuid().required(), - jobId: Joi.string().uuid().allow(null), - startDate: Joi.date().allow(null), - endDate: Joi.date().allow(null), - memberRate: Joi.number().allow(null), - customerRate: Joi.number().allow(null), + jobId: Joi.string().uuid().allow(null).default(null), + startDate: Joi.date().allow(null).default(null), + endDate: Joi.date().allow(null).default(null), + memberRate: Joi.number().allow(null).default(null), + customerRate: Joi.number().allow(null).default(null), rateType: Joi.rateType().required(), - status: Joi.jobStatus().required() + status: Joi.jobStatus().default('sourcing') }).required() }).required()