99declare function init ( schemaPath : string , options ?: ajvValidatorOptions ) : void ;
1010declare function init ( jsonSchema : Record < string , any > , options ?: ajvValidatorOptions ) : void ;
1111export { init } ;
12+ export { initAsync } ;
13+ export { validate } ;
14+ export { getNewMiddleware } ;
1215
1316/**
1417 * Initialize the input validation middleware by
@@ -19,7 +22,6 @@ export { init };
1922 */
2023declare function initAsync ( schemaPath : string , options ?: ajvValidatorOptions ) : Promise < void > ;
2124declare function initAsync ( jsonSchema : Record < string , any > , options ?: ajvValidatorOptions ) : Promise < void > ;
22- export { initAsync } ;
2325
2426/**
2527 * Middleware that validates the request against the swagger
@@ -28,7 +30,6 @@ export { initAsync };
2830declare function validate ( ctx : Record < string , any > , next : Function ) : void ; // koa
2931declare function validate ( req : Record < string , any > , res : Record < string , any > , next : Function ) : void ; // express
3032declare function validate ( options : FastifyPluginOptions ) : any ; // fastify
31- export { validate } ;
3233
3334export class InputValidationError extends Error {
3435 errors : Array < ErrorDetails | string > ;
@@ -84,12 +85,11 @@ declare class MiddlewareClass {
8485 // eslint-disable-next-line no-dupe-class-members
8586 initAsync ( jsonSchema : Record < string , any > , options ?: ajvValidatorOptions ) : Promise < void > ;
8687
87- validate ( ctx : Object , next : Function ) : void ; // koa
88+ validate ( ctx : Record < string , any > , next : Function ) : void ; // koa
8889 // eslint-disable-next-line no-dupe-class-members
89- validate ( req : Object , res : Object , next : Function ) : void ; // express
90+ validate ( req : Record < string , any > , res : Record < string , any > , next : Function ) : void ; // express
9091 // eslint-disable-next-line no-dupe-class-members
9192 validate ( options : FastifyPluginOptions ) : any ; // fastify
9293}
9394
9495declare function getNewMiddleware ( schemaPath : string , options ?: ajvValidatorOptions ) : MiddlewareClass ;
95- export { getNewMiddleware } ;
0 commit comments