Releases: tinacious/express-joi-validate
Releases · tinacious/express-joi-validate
Add TypeScript support, Upgrade Express
Adds support for TypeScript usage, e.g.:
import Joi, { SchemaMap } from '@hapi/joi';
import validate from 'express-joi-validate';
const contactSchema: SchemaMap = {
params: {
id: Joi.number().required()
}
};
app.get('/contacts/:id', validate(contactSchema), contactsHandler);
Please note that the explicit declaration of SchemaMap
is not necessary as it is inferred.
Express has been upgraded to 4.17.1.
Upgrade @hapi/joi dependency to v17.1.1
Merge pull request #11 from tinacious/upgrade-joi Upgrade Joi
Upgrade @hapi/joi dependency
Update README
Includes link to blog post with detailed usage and examples