UNPKG

no-hassle

Version:

Makes Node.js route handling easy with support for [Joi schema](https://github.com/hapijs/joi) validation and automatic Swagger generation based on these schema definitions. Uses Expressjs routing mechanism.

6 lines (5 loc) 416 B
import * as Joi from '@hapi/joi'; import { Request, Response, NextFunction } from 'express'; import { IValidateResponse } from '../interfaces'; export declare const validateSchema: (schema: object, options?: object) => (req: Request, res: Response, next: NextFunction) => Promise<void>; export declare const validateValue: <T>(value: T, schema: Joi.SchemaLike, options?: Joi.ValidationOptions) => IValidateResponse;