Closed ijemmao closed 3 years ago
What are the rules for validating each of the request bodies?
@Japhmayor We want to refactor validateDeveloperBody.js
so that it's using the joi
package.
More specifically, the checks that are made on the provided data
and its fields (name
, email
, and password
) should be validated with joi
instead of checking each, individual field.
This issue has been addressed in #370
Is your feature request related to a problem? Please describe. Inside
validateDeveloperBody.js
, the API is checking each request body to ensure that it is in the right shape and includes the expected values.Describe the solution you'd like Instead of doing schema validating by hand, the API could use
joi
which makes it more clear what the rules of validation for the developer body should be. Using this package also makes it easier for the Igbo API to create more rules in the future without exponentially growing in size.Describe alternatives you've considered N/A
Additional context N/A