1.0.2 • Published 1 year ago

@types/swagger-express-validator v1.0.2

Weekly downloads
192
License
MIT
Repository
github
Last release
1 year ago

Installation

npm install --save @types/swagger-express-validator

Summary

This package contains type definitions for swagger-express-validator (https://github.com/gargol/swagger-express-validator).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/swagger-express-validator.

index.d.ts

// Type definitions for swagger-express-validator 1.0
// Project: https://github.com/gargol/swagger-express-validator
// Definitions by: Pinguet62 <https://github.com/pinguet62>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4

import { Request, RequestHandler } from "express";

declare function SwaggerExpressValidator(options: SwaggerExpressValidator.Options): RequestHandler;

declare namespace SwaggerExpressValidator {
    interface Options {
        schema: any;
        validateRequest?: boolean | undefined;
        validateResponse?: boolean | undefined;
        allowNullable?: boolean | undefined;
        requestValidationFn?: ((req: Request, data: any, errors: any) => void) | undefined;
        responseValidationFn?: ((req: Request, data: any, errors: any) => void) | undefined;
    }

    function validator(options: Options): RequestHandler;
}

export = SwaggerExpressValidator;

Additional Details

  • Last updated: Sat, 02 Oct 2021 23:01:19 GMT
  • Dependencies: @types/express
  • Global values: none

Credits

These definitions were written by Pinguet62.