Repository: lukeautry/tsoa
Pull request #102 (2017-05-18 21:47:49)

Fix for projects that use Typescript path module resolution.
See issue #99.

Also, Luke if you need help maintaining this repo, I'd be more than willing to help.


Patch:
diff --git a/.gitignore b/.gitignore
index db4c6d9b..b137cb6e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 dist
-node_modules
\ No newline at end of file
+node_modules
+typings
\ No newline at end of file
diff --git a/README.MD b/README.MD
index e0992d4a..61f6d41d 100644
--- a/README.MD
+++ b/README.MD
@@ -318,6 +318,42 @@ export class SecureController {
 }
 ```
 
+### Path Mapping
+
+Per the [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/basic-types.html) under [module resolution](https://www.typescriptlang.org/docs/handbook/module-resolution.html):
+
+> Sometimes modules are not directly located under baseUrl. For instance, an import to a module "jquery" would be translated at runtime to "node_modules\jquery\dist\jquery.slim.min.js". Loaders use a mapping configuration to map module names to files at run-time, see RequireJs documentation and SystemJS documentation.
+>
+>The TypeScript compiler supports the declaration of such mappings using "paths" property in tsconfig.json files. Here is an example for how to specify the "paths" property for jquery.
+```json
+{
+  "compilerOptions": {
+    "baseUrl": ".", // This must be specified if "paths" is.
+    "paths": {
+      "jquery": ["node_modules/jquery/dist/jquery"] // This mapping is relative to "baseUrl"
+    }
+  }
+}
+```
+
+If you have a project that utilized this functionality, you can configure the internal generators to use the correct paths by providing a compilerOptions property to route configuration property in tsoa.json.
+
+```json
+{
+  "swagger": {
+    ...
+  },
+  "routes": {
+    ...
+  },
+   "compilerOptions": {
+        "baseUrl": "./path/to/base/url",
+        "paths": {
+            "exampleLib": "./path/to/example/lib"
+        }
+    }
+}
+```
 
 ### Use awesome Swagger tools
 
diff --git a/src/cli.ts b/src/cli.ts
index a1aea04f..7871f30a 100644
--- a/src/cli.ts
+++ b/src/cli.ts
@@ -8,6 +8,7 @@ import * as yargs from 'yargs';
 import * as fs from 'fs';
 import * as path from 'path';
 import * as PrettyError from 'pretty-error';
+import * as ts from 'typescript';
 
 const workingDir: string = process.cwd();
 const pe = new PrettyError();
@@ -43,6 +44,10 @@ const getConfig = (configPath = 'tsoa.json'): Config => {
   return config;
 };
 
+const validateCompilerOptions = (config?: ts.CompilerOptions): ts.CompilerOptions => {
+  return config || {};
+};
+
 const validateSwaggerConfig = (config: SwaggerConfig): SwaggerConfig => {
   if (!config.outputDirectory) { throw new Error('Missing outputDirectory: onfiguration most contain output directory'); }
   if (!config.entryFile) { throw new Error('Missing entryFile: Configuration must contain an entry point file.'); }
@@ -110,8 +115,9 @@ yargs
         config.swagger.host = args.host;
       }
 
+      const compilerOptions = validateCompilerOptions(config.compilerOptions);
       const swaggerConfig = validateSwaggerConfig(config.swagger);
-      const metadata = new MetadataGenerator(swaggerConfig.entryFile).Generate();
+      const metadata = new MetadataGenerator(swaggerConfig.entryFile, compilerOptions).Generate();
       new SpecGenerator(metadata, config.swagger).GenerateJson(swaggerConfig.outputDirectory);
 
       // tslint:disable-next-line:no-console
@@ -131,8 +137,9 @@ yargs
         config.routes.basePath = args.basePath;
       }
 
+      const compilerOptions = validateCompilerOptions(config.compilerOptions);
       const routesConfig = validateRoutesConfig(config.routes);
-      const metadata = new MetadataGenerator(routesConfig.entryFile).Generate();
+      const metadata = new MetadataGenerator(routesConfig.entryFile, compilerOptions).Generate();
       const routeGenerator = new RouteGenerator(metadata, routesConfig);
 
       let pathTransformer;
diff --git a/src/config.ts b/src/config.ts
index d104b8fa..a5c74dd3 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -1,3 +1,5 @@
+import * as ts from 'typescript';
+
 export interface Config {
   /**
   * Swagger generation configuration object
@@ -8,6 +10,14 @@ export interface Config {
   * Route generation configuration object
   */
   routes: RoutesConfig;
+
+  /**
+   * Typescript CompilerOptions to be used during generation
+   *
+   * @type {ts.CompilerOptions}
+   * @memberof RoutesConfig
+   */
+  compilerOptions?: ts.CompilerOptions;
 }
 
 export interface SwaggerConfig {
diff --git a/src/decorators/data-types.ts b/src/decorators/data-types.ts
new file mode 100644
index 00000000..a10d73a2
--- /dev/null
+++ b/src/decorators/data-types.ts
@@ -0,0 +1,35 @@
+export function IsInt(errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function IsLong(errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function IsFloat(errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function IsDouble(errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function IsDate(errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function IsDateTime(errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function IsString(errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function IsArray(errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function IsBoolean(errorMsg?: string): any {
+  return () => { return; };
+}
diff --git a/src/decorators/validations.ts b/src/decorators/validations.ts
new file mode 100644
index 00000000..67fd91b6
--- /dev/null
+++ b/src/decorators/validations.ts
@@ -0,0 +1,47 @@
+export function UniqueItems(errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function MinItems(min: number, errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function MaxItems(max: number, errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function Minimum(min: number, errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function Maximum(max: number, errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function MinLength(min: number, errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function MaxLength(max: number, errorMsg?: string): any {
+  return () => { return; };
+}
+
+export function Pattern(pattern: string, errorMsg?: string): any {
+  return () => { return; };
+}
+
+/**
+ * date ISO 8601 format.
+ * ex. 2017-05-14, 2017-05-14 05:18Z, 2017-05-14T05:18Z
+ */
+export function MinDate(date: string, errorMsg?: string): any {
+  return () => { return; };
+}
+
+/**
+ * date ISO 8601 format.
+ * ex. 2017-05-14, 2017-05-14 05:18Z, 2017-05-14T05:18Z
+ */
+export function MaxDate(date: string, errorMsg?: string): any {
+  return () => { return; };
+}
diff --git a/src/index.ts b/src/index.ts
index f23c1c46..9fd40dea 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -6,4 +6,6 @@ export * from './decorators/route';
 export * from './decorators/security';
 export * from './interfaces/controller';
 export * from './decorators/response';
+export * from './decorators/data-types';
+export * from './decorators/validations';
 export * from './routeGeneration/templateHelpers';
diff --git a/src/manual_typings/handlebars-helpers.d.ts b/src/manual_typings/handlebars-helpers.d.ts
new file mode 100644
index 00000000..b65beb8f
--- /dev/null
+++ b/src/manual_typings/handlebars-helpers.d.ts
@@ -0,0 +1,3 @@
+declare module 'handlebars-helpers' {
+  export function comparison(config: any): any;
+}
diff --git a/src/metadataGeneration/metadataGenerator.ts b/src/metadataGeneration/metadataGenerator.ts
index e2c90ea4..c053a3cc 100644
--- a/src/metadataGeneration/metadataGenerator.ts
+++ b/src/metadataGeneration/metadataGenerator.ts
@@ -12,8 +12,8 @@ export class MetadataGenerator {
 
   public IsExportedNode(node: ts.Node) { return true; }
 
-  constructor(entryFile: string) {
-    this.program = ts.createProgram([entryFile], {});
+  constructor(entryFile: string, compilerOptions?: ts.CompilerOptions) {
+    this.program = ts.createProgram([entryFile], compilerOptions || {});
     this.typeChecker = this.program.getTypeChecker();
     MetadataGenerator.current = this;
   }
diff --git a/src/metadataGeneration/methodGenerator.ts b/src/metadataGeneration/methodGenerator.ts
index 69a4f593..f41d960b 100644
--- a/src/metadataGeneration/methodGenerator.ts
+++ b/src/metadataGeneration/methodGenerator.ts
@@ -2,7 +2,7 @@ import * as ts from 'typescript';
 import { Method, ResponseType, Type } from './types';
 import { ResolveType } from './resolveType';
 import { ParameterGenerator } from './parameterGenerator';
-import { getJSDocDescription, isExistJSDocTag, getJSDocComment } from './../utils/jsDocUtils';
+import { getJSDocDescription, getJSDocTag, isExistJSDocTag } from './../utils/jsDocUtils';
 import { getDecorators, getInitializerValue } from './../utils/decoratorUtils';
 import { GenerateMetadataError } from './exceptions';
 
@@ -28,7 +28,7 @@ export class MethodGenerator {
     responses.push(this.getMethodSuccessResponse(type));
 
     return {
-      deprecated: isExistJSDocTag(this.node, tag => tag.tagName.text === 'deprecated'),
+      deprecated: isExistJSDocTag(this.node, 'deprecated'),
       description: getJSDocDescription(this.node),
       method: this.method,
       name: identifier.text,
@@ -36,7 +36,7 @@ export class MethodGenerator {
       path: this.path,
       responses,
       security: this.getMethodSecurity(),
-      summary: getJSDocComment(this.node, 'summary'),
+      summary: getJSDocTag(this.node, 'summary'),
       tags: this.getMethodTags(),
       type
     };
diff --git a/src/metadataGeneration/parameterGenerator.ts b/src/metadataGeneration/parameterGenerator.ts
index 84817fc2..86d01365 100644
--- a/src/metadataGeneration/parameterGenerator.ts
+++ b/src/metadataGeneration/parameterGenerator.ts
@@ -4,7 +4,7 @@ import { Parameter, Type } from './types';
 import { ResolveType } from './resolveType';
 import { GenerateMetadataError } from './exceptions';
 import { getDecoratorName, getDecoratorTextValue } from './../utils/decoratorUtils';
-import { getParameterValidators } from './../utils/validatorUtils';
+import { getValidators } from './../utils/validatorUtils';
 
 export class ParameterGenerator {
   constructor(
@@ -49,7 +49,7 @@ export class ParameterGenerator {
       required: !parameter.questionToken,
       type: { typeName: 'object' },
       parameterName,
-      validators: getParameterValidators(this.parameter, parameterName),
+      validators: getValidators(this.parameter),
     };
   }
 
@@ -68,7 +68,7 @@ export class ParameterGenerator {
       required: !parameter.questionToken,
       type: type,
       parameterName,
-      validators: getParameterValidators(this.parameter, parameterName),
+      validators: getValidators(this.parameter),
     };
   }
 
@@ -87,7 +87,7 @@ export class ParameterGenerator {
       required: !parameter.questionToken,
       type,
       parameterName,
-      validators: getParameterValidators(this.parameter, parameterName),
+      validators: getValidators(this.parameter),
     };
   }
 
@@ -106,8 +106,8 @@ export class ParameterGenerator {
       required: !parameter.questionToken,
       type,
       parameterName,
-      validators: getParameterValidators(this.parameter, parameterName),
-    };
+      validators: getValidators(this.parameter),
+    } as Parameter;
   }
 
   private getQueryParameter(parameter: ts.ParameterDeclaration): Parameter {
@@ -125,8 +125,8 @@ export class ParameterGenerator {
       required: !parameter.questionToken,
       type,
       parameterName,
-      validators: getParameterValidators(this.parameter, parameterName),
-    };
+      validators: getValidators(this.parameter),
+    } as Parameter;
   }
 
   private getPathParameter(parameter: ts.ParameterDeclaration): Parameter {
@@ -148,8 +148,8 @@ export class ParameterGenerator {
       required: true,
       type,
       parameterName,
-      validators: getParameterValidators(this.parameter, parameterName),
-    };
+      validators: getValidators(this.parameter),
+    } as Parameter;
   }
 
   private getParameterDescription(node: ts.ParameterDeclaration) {
diff --git a/src/metadataGeneration/resolveType.ts b/src/metadataGeneration/resolveType.ts
index a88a176b..64cb8b16 100644
--- a/src/metadataGeneration/resolveType.ts
+++ b/src/metadataGeneration/resolveType.ts
@@ -2,8 +2,8 @@ import * as ts from 'typescript';
 import * as _ from 'lodash';
 import { MetadataGenerator } from './metadataGenerator';
 import { Type, EnumerateType, ReferenceType, ArrayType, Property } from './types';
-import { getJSDocTagNames } from './../utils/jsDocUtils';
-import { getPropertyValidators } from './../utils/validatorUtils';
+import { getDecoratorName } from './../utils/decoratorUtils';
+import { getValidators } from './../utils/validatorUtils';
 import { GenerateMetadataError } from './exceptions';
 
 const syntaxKindMap: { [kind: number]: string } = {};
@@ -16,7 +16,6 @@ const localReferenceTypeCache: { [typeName: string]: ReferenceType } = {};
 const inProgressTypes: { [typeName: string]: boolean } = {};
 
 type UsableDeclaration = ts.InterfaceDeclaration | ts.ClassDeclaration | ts.TypeAliasDeclaration;
-
 export function ResolveType(typeNode: ts.TypeNode): Type {
   const primitiveType = getPrimitiveType(typeNode);
   if (primitiveType) {
@@ -82,21 +81,18 @@ function getPrimitiveType(typeNode: ts.TypeNode): Type | undefined {
       return { typeName: 'double' };
     }
 
-    const tags = getJSDocTagNames(parentNode).filter(name => {
-      return ['isInt', 'isLong', 'isFloat', 'isDouble'].some(m => m === name);
+    const decoratorName = getDecoratorName(parentNode, identifier => {
+      return ['IsInt', 'IsLong', 'IsFloat', 'isDouble'].some(m => m === identifier.text);
     });
-    if (tags.length === 0) {
-      return { typeName: 'double' };
-    }
 
-    switch (tags[0]) {
-      case 'isInt':
+    switch (decoratorName) {
+      case 'IsInt':
         return { typeName: 'integer' };
-      case 'isLong':
+      case 'IsLong':
         return { typeName: 'long' };
-      case 'isFloat':
+      case 'IsFloat':
         return { typeName: 'float' };
-      case 'isDouble':
+      case 'IsDouble':
         return { typeName: 'double' };
       default:
         return { typeName: 'double' };
@@ -110,17 +106,13 @@ function getDateType(typeNode: ts.TypeNode): Type {
   if (!parentNode) {
     return { typeName: 'datetime' };
   }
-  const tags = getJSDocTagNames(parentNode).filter(name => {
-    return ['isDate', 'isDateTime'].some(m => m === name);
+  const decoratorName = getDecoratorName(parentNode, identifier => {
+    return ['IsDate', 'IsDateTime'].some(m => m === identifier.text);
   });
-
-  if (tags.length === 0) {
-    return { typeName: 'datetime' };
-  }
-  switch (tags[0]) {
-    case 'isDate':
+  switch (decoratorName) {
+    case 'IsDate':
       return { typeName: 'date' };
-    case 'isDateTime':
+    case 'IsDateTime':
       return { typeName: 'datetime' };
     default:
       return { typeName: 'datetime' };
@@ -410,7 +402,7 @@ function getModelTypeProperties(node: UsableDeclaration, genericTypes?: ts.TypeN
           name: identifier.text,
           required: !propertyDeclaration.questionToken,
           type: ResolveType(aType),
-          validators: getPropertyValidators(propertyDeclaration),
+          validators: getValidators(propertyDeclaration),
         } as Property;
       });
   }
@@ -452,7 +444,7 @@ function getModelTypeProperties(node: UsableDeclaration, genericTypes?: ts.TypeN
         name: identifier.text,
         required: !declaration.questionToken,
         type: ResolveType(declaration.type),
-        validators: getPropertyValidators(declaration as ts.PropertyDeclaration),
+        validators: getValidators(declaration),
       } as Property;
     });
 }
diff --git a/src/routeGeneration/templates/express.ts b/src/routeGeneration/templates/express.ts
index 0d5afca5..189ec6d6 100644
--- a/src/routeGeneration/templates/express.ts
+++ b/src/routeGeneration/templates/express.ts
@@ -68,7 +68,7 @@ export function RegisterRoutes(app: any) {
 
 
             const promise = controller.{{name}}.apply(controller, validatedArgs);
-            let statusCode: any;
+            let statusCode: number | undefined = undefined;
             if (controller instanceof Controller) {
                 statusCode = (controller as Controller).getStatus();
             }
diff --git a/src/routeGeneration/templates/hapi.ts b/src/routeGeneration/templates/hapi.ts
index 4455f5f1..431999dc 100644
--- a/src/routeGeneration/templates/hapi.ts
+++ b/src/routeGeneration/templates/hapi.ts
@@ -76,7 +76,7 @@ export function RegisterRoutes(server: hapi.Server) {
                     {{/if}}
 
                     const promise = controller.{{name}}.apply(controller, validatedArgs);
-                    let statusCode: any;
+                    let statusCode: number | undefined = undefined;
                     if (controller instanceof Controller) {
                         statusCode = (controller as Controller).getStatus();
                     }
diff --git a/src/routeGeneration/templates/koa.ts b/src/routeGeneration/templates/koa.ts
index 0411110c..b602a77d 100644
--- a/src/routeGeneration/templates/koa.ts
+++ b/src/routeGeneration/templates/koa.ts
@@ -71,7 +71,7 @@ export function RegisterRoutes(router: KoaRouter) {
             {{/if}}
 
             const promise = controller.{{name}}.apply(controller, validatedArgs);
-            let statusCode: any;
+            let statusCode: number | undefined = undefined;
             if (controller instanceof Controller) {
                 statusCode = (controller as Controller).getStatus();
             }
diff --git a/src/utils/jsDocUtils.ts b/src/utils/jsDocUtils.ts
index 198da817..e9553817 100644
--- a/src/utils/jsDocUtils.ts
+++ b/src/utils/jsDocUtils.ts
@@ -7,43 +7,28 @@ export function getJSDocDescription(node: ts.Node) {
   return jsDocs[0].comment || '';
 }
 
-export function getJSDocComment(node: ts.Node, tagName: string) {
-  const tags = getJSDocTags(node, tag => tag.tagName.text === tagName);
-  if (tags.length === 0) {
+export function getJSDocTag(node: ts.Node, tagName: string) {
+  const tags = getJSDocTags(node, tagName);
+  if (!tags || !tags.length) {
     return;
   }
   return tags[0].comment;
 }
 
-export function getJSDocTagNames(node: ts.Node) {
-  let tags: ts.JSDocTag[];
-  if (node.kind === ts.SyntaxKind.Parameter) {
-    const parameterName = ((node as any).name as ts.Identifier).text;
-    tags = getJSDocTags(node.parent as any, tag => {
-      return tag.comment !== undefined && tag.comment.startsWith(parameterName);
-    });
-  } else {
-    tags = getJSDocTags(node as any, tag => {
-      return tag.comment !== undefined;
-    });
+export function isExistJSDocTag(node: ts.Node, tagName: string) {
+  const tags = getJSDocTags(node, tagName);
+  if (!tags || !tags.length) {
+    return false;
   }
-  return tags.map(tag => {
-    return tag.tagName.text;
-  });
+  return true;
 }
 
-export function getJSDocTags(node: ts.Node, isMatching: (tag: ts.JSDocTag) => boolean) {
+function getJSDocTags(node: ts.Node, tagName: string) {
   const jsDocs = (node as any).jsDoc as ts.JSDoc[];
-  if (!jsDocs || jsDocs.length === 0) { return []; }
+  if (!jsDocs || !jsDocs.length) { return; }
 
   const jsDoc = jsDocs[0];
-  if (!jsDoc.tags) { return []; };
-
-  return jsDoc.tags.filter(isMatching);
-}
+  if (!jsDoc.tags) { return; };
 
-export function isExistJSDocTag(node: ts.Node, isMatching: (tag: ts.JSDocTag) => boolean) {
-  const tags = getJSDocTags(node, isMatching);
-  if (tags.length === 0) { return false; }
-  return true;
+  return jsDoc.tags.filter(t => t.tagName.text === tagName);
 }
diff --git a/src/utils/validatorUtils.ts b/src/utils/validatorUtils.ts
index 586ce22c..e4ef1908 100644
--- a/src/utils/validatorUtils.ts
+++ b/src/utils/validatorUtils.ts
@@ -1,189 +1,80 @@
 import * as ts from 'typescript';
 import * as moment from 'moment';
 import { Validators } from './../metadataGeneration/types';
-import { getJSDocTags } from './jsDocUtils';
+import { getDecorators } from './decoratorUtils';
 import { GenerateMetadataError } from './../metadataGeneration/exceptions';
 
-export function getParameterValidators(parameter: ts.ParameterDeclaration, parameterName): Validators {
-    if (!parameter.parent) { return {}; };
-
-    const tags = getJSDocTags(parameter.parent, tag => {
-        return getParameterTagSupport().some(value => {
-            if (!tag.comment) { return false; };
-            return value === tag.tagName.text && tag.comment.startsWith(parameterName);
-        });
-    });
-
-    function getValue(comment?: string) {
-        if (!comment) { return; }
-        return comment.split(' ')[0];
-    }
-    function getErrorMsg(comment?: string, isValue = true) {
-        if (!comment) { return; }
-        if (isValue) {
-            const indexOf = comment.indexOf(' ');
-            if (indexOf > 0) {
-                return comment.substr(indexOf + 1);
-            } else {
-                return undefined;
-            }
-        } else {
-            return comment;
-        }
-    }
-
-    return tags.reduce((validateObj, tag) => {
-        if (!tag.comment) { return validateObj; }
-
-        const name = tag.tagName.text;
-        const comment = tag.comment.substr(tag.comment.indexOf(' ') + 1).trim();
-        const value = getValue(comment);
-
-        switch (name) {
-            case 'uniqueItems':
-                validateObj[name] = {
-                    errorMsg: getErrorMsg(comment, false),
-                    value: undefined,
-                };
-                break;
-            case 'minimum':
-            case 'maximum':
-            case 'minItems':
-            case 'maxItems':
-            case 'minLength':
-            case 'maxLength':
-                if (isNaN(value as any)) {
-                    throw new GenerateMetadataError(parameter, `${name} parameter use number.`);
-                }
-                validateObj[name] = {
-                    errorMsg: getErrorMsg(comment),
-                    value: Number(value),
-                };
-                break;
-            case 'minDate':
-            case 'maxDate':
-                if (!moment(value, moment.ISO_8601, true).isValid()) {
-                    throw new GenerateMetadataError(parameter, `${name} parameter use date format ISO 8601 ex. 2017-05-14, 2017-05-14T05:18Z`);
-                }
-                validateObj[name] = {
-                    errorMsg: getErrorMsg(comment),
-                    value,
-                };
-                break;
-            case 'pattern':
-                if (typeof value !== 'string') {
-                    throw new GenerateMetadataError(parameter, `${name} patameter use string.`);
-                }
-                validateObj[name] = {
-                    errorMsg: getErrorMsg(comment),
-                    value
-                };
-                break;
-            default:
-                if (name.startsWith('is')) {
-                    const errorMsg = getErrorMsg(comment, false);
-                    if (errorMsg) {
-                        validateObj[name] = {
-                            errorMsg,
-                            value: undefined,
-                        };
-                    }
-                }
-                break;
-        }
-        return validateObj;
-    }, {} as Validators);
-}
-
-export function getPropertyValidators(property: ts.PropertyDeclaration): Validators {
-    const tags = getJSDocTags(property, (tag) => {
-        return getParameterTagSupport().some(value => value === tag.tagName.text);
+export function getValidators(property: ts.Node): Validators {
+    const validatorDecorator = getDecorators(property, ident => {
+        return supportValidatorDecorator().some(name => name === ident.text);
     });
-    function getValue(comment?: string) {
-        if (!comment) { return; }
-        return comment.split(' ')[0];
-    }
-    function getErrorMsg(comment?: string, isValue = true) {
-        if (!comment) { return; }
-        if (isValue) {
-            const indexOf = comment.indexOf(' ');
-            if (indexOf > 0) {
-                return comment.substr(indexOf + 1);
-            } else {
-                return undefined;
-            }
-        } else {
-            return comment;
-        }
-    }
-
-    return tags.reduce((validateObj, tag) => {
-        const name = tag.tagName.text;
-        const comment = tag.comment;
-        const value = getValue(comment);
 
+    return validatorDecorator.reduce((previous, decorator) => {
+        const name = decorator.text;
+        const swaggerName = name.charAt(0).toLowerCase() + name.slice(1);
+        const expression = decorator.parent as ts.CallExpression;
         switch (name) {
-            case 'uniqueItems':
-                validateObj[name] = {
-                    errorMsg: getErrorMsg(comment, false),
+            case 'UniqueItems':
+                previous[swaggerName] = {
+                    errorMsg: getValidatorValue(expression.arguments, 0),
                     value: undefined,
                 };
                 break;
-            case 'minimum':
-            case 'maximum':
-            case 'minItems':
-            case 'maxItems':
-            case 'minLength':
-            case 'maxLength':
-                if (isNaN(value as any)) {
+            case 'Minimum':
+            case 'Maximum':
+            case 'MinItems':
+            case 'MaxItems':
+            case 'MinLength':
+            case 'MaxLength':
+                if (isNaN(getValidatorValue(expression.arguments, 0) as any)) {
                     throw new GenerateMetadataError(property, `${name} parameter use number.`);
                 }
-                validateObj[name] = {
-                    errorMsg: getErrorMsg(comment),
-                    value: Number(value),
+                previous[swaggerName] = {
+                    errorMsg: getValidatorValue(expression.arguments, 1),
+                    value: Number(getValidatorValue(expression.arguments, 0)),
                 };
                 break;
-            case 'minDate':
-            case 'maxDate':
-                if (!moment(value, moment.ISO_8601, true).isValid()) {
+            case 'MinDate':
+            case 'MaxDate':
+                if (!moment(getValidatorValue(expression.arguments, 0), moment.ISO_8601, true).isValid()) {
                     throw new GenerateMetadataError(property, `${name} parameter use date format ISO 8601 ex. 2017-05-14, 2017-05-14T05:18Z`);
                 }
-                validateObj[name] = {
-                    errorMsg: getErrorMsg(comment),
-                    value,
+                previous[swaggerName] = {
+                    errorMsg: getValidatorValue(expression.arguments, 1),
+                    value: getValidatorValue(expression.arguments, 0),
                 };
                 break;
-            case 'pattern':
-                if (typeof value !== 'string') {
+            case 'Pattern':
+                if (typeof getValidatorValue(expression.arguments, 0) !== 'string') {
                     throw new GenerateMetadataError(property, `${name} patameter use string.`);
                 }
-                validateObj[name] = {
-                    errorMsg: getErrorMsg(comment),
-                    value
+                previous[swaggerName] = {
+                    errorMsg: getValidatorValue(expression.arguments, 1),
+                    value: getValidatorValue(expression.arguments, 0),
                 };
                 break;
             default:
-                if (name.startsWith('is')) {
-                    const errorMsg = getErrorMsg(comment, false);
-                    if (errorMsg) {
-                        validateObj[name] = {
-                            errorMsg,
-                            value: undefined,
-                        };
-                    }
+                const errorMsg = getValidatorValue(expression.arguments, 0);
+                if (errorMsg) {
+                    previous[swaggerName] = {
+                        errorMsg,
+                        value: undefined,
+                    };
                 }
                 break;
         }
-        return validateObj;
+        return previous;
     }, {} as Validators);
-};
+}
+
+function getValidatorValue(nodes: ts.NodeArray<ts.Expression>, index: number) {
+    if (nodes.length <= index) { return; }
+    return (nodes[index] as ts.StringLiteral).text;
+}
 
-function getParameterTagSupport() {
-    return [
-        'isString', 'isBoolean', 'isInt', 'isLong', 'isFloat', 'isDouble', 'isDate', 'isDateTime',
-        'minItems', 'maxItems', 'uniqueItems',
-        'minLength', 'maxLength', 'pattern',
-        'minimum', 'maximum',
-        'minDate', 'maxDate',
-    ];
+function supportValidatorDecorator() {
+    return ['UniqueItems', 'MinItems', 'MaxItems', 'Minimum', 'Maximum',
+        'MinLength', 'MaxLength', 'Pattern', 'MinDate', 'MaxDate',
+        'IsInt', 'IsLong', 'IsFloat', 'IsDouble', 'IsDate', 'IsDateTime',
+        'IsString', 'IsArray', 'IsBoolean'];
 }
diff --git a/tsconfig.json b/tsconfig.json
index 0240c6fb..c8cf370a 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -9,10 +9,6 @@
             "es6",
             "dom"
         ],
-        "typeRoots": [
-            "node_modules/@types",
-            "./typings"
-        ],
         "experimentalDecorators": true,
         "declaration": true,
         "noUnusedLocals": true,


Test patch:
diff --git a/tests/fixtures/controllers/getController.ts b/tests/fixtures/controllers/getController.ts
index 2f8bc9b5..e048df4c 100644
--- a/tests/fixtures/controllers/getController.ts
+++ b/tests/fixtures/controllers/getController.ts
@@ -6,6 +6,12 @@ import {
   Controller,
   Route,
   Tags,
+  IsDouble,
+  IsString,
+  Minimum,
+  Maximum,
+  MinLength,
+  MaxLength
 } from '../../../src';
 import {
   GenericModel,
@@ -67,24 +73,14 @@ export class GetTestController extends Controller {
   /**
   * @param numberPathParam This is a description for numberPathParam
   * @param numberParam This is a description for numberParam
-  * @isDouble numberPathParam
-  * @minimum numberPathParam 1
-  * @maximum numberPathParam 10
-  *
-  * @minLength stringPathParam 1
-  * @maxLength stringPathParam 10
-  *
-  * @isString stringParam Custom error message
-  * @minLength stringParam 3
-  * @maxLength stringParam 10
   */
   @Get('{numberPathParam}/{booleanPathParam}/{stringPathParam}')
   public async getModelByParams(
-    numberPathParam: number,
-    stringPathParam: string,
+    @IsDouble() @Minimum(1) @Maximum(10) numberPathParam: number,
+    @MinLength(1) @MaxLength(10) stringPathParam: string,
     booleanPathParam: boolean,
     @Query() booleanParam: boolean,
-    @Query() stringParam: string,
+    @IsString('Custom error message') @MinLength(3) @MaxLength(10) @Query() stringParam: string,
     @Query() numberParam: number,
     @Query() optionalStringParam?: string): Promise<TestModel> {
     const model = new ModelService().getModel();
diff --git a/tests/fixtures/controllers/parameterController.ts b/tests/fixtures/controllers/parameterController.ts
index 7699511e..ca32fd0e 100644
--- a/tests/fixtures/controllers/parameterController.ts
+++ b/tests/fixtures/controllers/parameterController.ts
@@ -5,6 +5,8 @@ import {
     Header,
     Body,
     BodyProp,
+    IsInt,
+    IsFloat,
     Get,
     Post,
     Route
@@ -22,16 +24,13 @@ export class ParameterController {
      * @param {number} weight Weight description
      * @param {boolean} human Human description
      * @param {Gender} gender Gender description
-     *
-     * @isInt age
-     * @isFloat weight
      */
     @Get('Query')
     public async getQuery(
         @Query() firstname: string,
         @Query('last_name') lastname: string,
-        @Query() age: number,
-        @Query() weight: number,
+        @Query() @IsInt() age: number,
+        @Query() @IsFloat() weight: number,
         @Query() human: boolean,
         @Query() gender: Gender
         ): Promise<ParameterTestModel> {
@@ -54,16 +53,13 @@ export class ParameterController {
      * @param {number} weight Weight description
      * @param {boolean} human Human description
      * @param {Gender} gender Gender description
-     *
-     * @isInt age
-     * @isFloat weight
      */
     @Get('Path/{firstname}/{last_name}/{age}/{weight}/{human}/{gender}')
     public async getPath(
         firstname: string,
         @Path('last_name') lastname: string,
-        @Path() age: number,
-        @Path() weight: number,
+        @Path() @IsInt() age: number,
+        @Path() @IsFloat() weight: number,
         @Path() human: boolean,
         @Path() gender: Gender
         ): Promise<ParameterTestModel> {
@@ -86,16 +82,13 @@ export class ParameterController {
      * @param {number} weight Weight description
      * @param {boolean} human Human description
      * @param {Gender} gender Gender description
-     *
-     * @isInt age
-     * @isFloat weight
      */
     @Get('Header')
     public async getHeader(
         @Header() firstname: string,
         @Header('last_name') lastname: string,
-        @Header() age: number,
-        @Header() weight: number,
+        @Header() @IsInt() age: number,
+        @Header() @IsFloat() weight: number,
         @Header() human: boolean,
         @Header() gender: Gender
         ): Promise<ParameterTestModel> {
@@ -150,16 +143,13 @@ export class ParameterController {
      * @param {number} weight weight description
      * @param {boolean} human human description
      * @param {Gender} gender Gender description
-     *
-     * @isInt age
-     * @isFloat weight
      */
     @Post('BodyProps')
     public async getBodyProps(
         @BodyProp('firstname') firstname: string,
         @BodyProp('lastname') lastname: string,
-        @BodyProp('age') age: number,
-        @BodyProp('weight') weight: number,
+        @BodyProp('age') @IsInt() age: number,
+        @BodyProp('weight') @IsFloat() weight: number,
         @BodyProp('human') human: boolean,
         @BodyProp('gender') gender: Gender): Promise<ParameterTestModel> {
         return Promise.resolve<ParameterTestModel>({
diff --git a/tests/fixtures/controllers/validateController.ts b/tests/fixtures/controllers/validateController.ts
index 979364e0..626cc4c9 100644
--- a/tests/fixtures/controllers/validateController.ts
+++ b/tests/fixtures/controllers/validateController.ts
@@ -1,5 +1,9 @@
 import {
   Route, Get, Post, Query, Body,
+  Minimum, Maximum,
+  MinLength, MaxLength, Pattern,
+  MinDate, MaxDate,
+  IsLong, IsDouble, IsBoolean
 } from './../../../src';
 import {
   ValidateModel
@@ -24,123 +28,68 @@ export interface ValidateStringResponse {
 
 @Route('Validate')
 export class ValidateController {
-
-  /**
-   *
-   * @param {Date} minDateValue
-   * @param {Date} maxDateValue
-   * @isDate minDateValue
-   * @minDate minDateValue 2018-01-01
-   * @isDate maxDateValue
-   * @maxDate maxDateValue 2016-01-01
-   */
   @Get('parameter/date')
   public dateValidate(
-    @Query() minDateValue: Date,
-    @Query() maxDateValue: Date): Promise<ValidateDateResponse> {
+    @Query() @MinDate('2018-01-01') minDateValue: Date,
+    @Query() @MaxDate('2016-01-01') maxDateValue: Date): Promise<ValidateDateResponse> {
     return Promise.resolve({
       minDateValue,
       maxDateValue,
     });
   }
-  /**
-   *
-   * @param {Date} minDateValue
-   * @param {Date} maxDateValue
-   * @isDateTime minDateValue
-   * @minDate minDateValue 2018-01-01T00:00:00
-   * @isDateTime maxDateValue
-   * @maxDate maxDateValue 2016-01-01T00:00:00
-   */
   @Get('parameter/datetime')
   public dateTimeValidate(
-    @Query() minDateValue: Date,
-    @Query() maxDateValue: Date): Promise<ValidateDateResponse> {
+    @Query() @MinDate('2018-01-01T00:00:00') minDateValue: Date,
+    @Query() @MaxDate('2016-01-01T00:00:00') maxDateValue: Date): Promise<ValidateDateResponse> {
     return Promise.resolve({
       minDateValue,
       maxDateValue,
     });
   }
-  /**
-   * @param {number} minValue
-   * @param {number} maxValue
-   * @isInt minValue
-   * @minimum minValue 5
-   * @isInt maxValue
-   * @maximum maxValue 3
-   */
-  @Get('parameter/integer')
+  @Get('parameter/long')
   public longValidate(
-    @Query() minValue: number,
-    @Query() maxValue: number): Promise<ValidateNumberResponse> {
+    @Query() @IsLong() @Minimum(5) minValue: number,
+    @Query() @IsLong() @Maximum(3) maxValue: number): Promise<ValidateNumberResponse> {
     return Promise.resolve({
       minValue,
       maxValue,
     });
   }
-  /**
-   * @param {number} minValue
-   * @param {number} maxValue
-   * @isFloat minValue
-   * @minimum minValue 5.5
-   * @isFloat maxValue
-   * @maximum maxValue 3.5
-   */
-  @Get('parameter/float')
+  @Get('parameter/double')
   public doubleValidate(
-    @Query() minValue?: number,
-    @Query() maxValue?: number): Promise<ValidateNumberResponse> {
+    @Query() @IsDouble() @Minimum(5.5) minValue?: number,
+    @Query() @IsDouble() @Maximum(3.5) maxValue?: number): Promise<ValidateNumberResponse> {
     return Promise.resolve({
       minValue,
       maxValue,
     });
   }
-  /**
-   * @param {boolean} boolValue
-   * @isBoolean boolValue
-   */
   @Get('parameter/boolean')
   public booleanValidate(
-    @Query() boolValue: boolean): Promise<ValidateBooleanResponse> {
+    @Query() @IsBoolean() boolValue: boolean): Promise<ValidateBooleanResponse> {
     return Promise.resolve({
       boolValue
     });
   }
-  /**
-   * @param {string} minLength
-   * @param {string} maxLength
-   * @param {string} patternValue
-   * @minLength minLength 5
-   * @maxLength maxLength 3
-   * @pattern patternValue ^[a-zA-Z]+$
-   */
   @Get('parameter/string')
   public stringValidate(
-    @Query() minLength: string,
-    @Query() maxLength: string,
-    @Query() patternValue: string): Promise<ValidateStringResponse> {
+    @Query() @MinLength(5) minLength: string,
+    @Query() @MaxLength(3) maxLength: string,
+    @Query() @Pattern('^[a-zA-Z]+$') patternValue: string): Promise<ValidateStringResponse> {
     return Promise.resolve({
       minLength,
       maxLength,
       patternValue,
     });
   }
-  /**
-   * @param {number} longValue
-   * @isLong longValue Required long number.
-   */
   @Get('parameter/customRequiredErrorMsg')
   public customRequiredErrorMsg(
-    @Query() longValue: number): Promise<void> {
+    @Query() @IsLong('Required long number.') longValue: number): Promise<void> {
     return Promise.resolve();
   }
-  /**
-   * @param {number} longValue
-   * @isLong longValue Invalid long number.
-   */
   @Get('parameter/customInvalidErrorMsg')
   public customInvalidErrorMsg(
-    @Query() longValue: number): Promise<void> {
+    @Query() @IsLong('Invalid long number.') longValue: number): Promise<void> {
     return Promise.resolve();
   }
 
diff --git a/tests/fixtures/custom/routes.ts b/tests/fixtures/custom/routes.ts
index aa738413..664f4084 100644
--- a/tests/fixtures/custom/routes.ts
+++ b/tests/fixtures/custom/routes.ts
@@ -148,7 +148,7 @@ const models: any = {
     properties: {
       "firstname": { "required": true, "typeName": "string" },
       "lastname": { "required": true, "typeName": "string" },
-      "age": { "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "* " }, "minimum": { "value": 1 }, "maximum": { "value": 100 } } },
+      "age": { "required": true, "typeName": "integer", "validators": { "minimum": { "value": 1 }, "maximum": { "value": 100 } } },
       "weight": { "required": true, "typeName": "float" },
       "human": { "required": true, "typeName": "boolean" },
       "gender": { "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
@@ -617,7 +617,7 @@ export function RegisterRoutes(app: any) {
   app.get('/v1/GetTest/:numberPathParam/:booleanPathParam/:stringPathParam',
     function(request: any, response: any, next: any) {
       const args = {
-        numberPathParam: { "in": "path", "name": "numberPathParam", "required": true, "typeName": "double", "validators": { "isDouble": { "errorMsg": "numberPathParam" }, "minimum": { "value": 1 }, "maximum": { "value": 10 } } },
+        numberPathParam: { "in": "path", "name": "numberPathParam", "required": true, "typeName": "double", "validators": { "minimum": { "value": 1 }, "maximum": { "value": 10 } } },
         stringPathParam: { "in": "path", "name": "stringPathParam", "required": true, "typeName": "string", "validators": { "minLength": { "value": 1 }, "maxLength": { "value": 10 } } },
         booleanPathParam: { "in": "path", "name": "booleanPathParam", "required": true, "typeName": "boolean" },
         booleanParam: { "in": "query", "name": "booleanParam", "required": true, "typeName": "boolean" },
@@ -1256,8 +1256,8 @@ export function RegisterRoutes(app: any) {
       const args = {
         firstname: { "in": "query", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "query", "name": "last_name", "required": true, "typeName": "string" },
-        age: { "in": "query", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "query", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "query", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "query", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "query", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "query", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1284,8 +1284,8 @@ export function RegisterRoutes(app: any) {
       const args = {
         firstname: { "in": "path", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "path", "name": "last_name", "required": true, "typeName": "string" },
-        age: { "in": "path", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "path", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "path", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "path", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "path", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "path", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1312,8 +1312,8 @@ export function RegisterRoutes(app: any) {
       const args = {
         firstname: { "in": "header", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "header", "name": "last_name", "required": true, "typeName": "string" },
-        age: { "in": "header", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "header", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "header", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "header", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "header", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "header", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1386,8 +1386,8 @@ export function RegisterRoutes(app: any) {
       const args = {
         firstname: { "in": "body-prop", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "body-prop", "name": "lastname", "required": true, "typeName": "string" },
-        age: { "in": "body-prop", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "body-prop", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "body-prop", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "body-prop", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "body-prop", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "body-prop", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
diff --git a/tests/fixtures/express/routes.ts b/tests/fixtures/express/routes.ts
index ebeb4899..4ab2ba52 100644
--- a/tests/fixtures/express/routes.ts
+++ b/tests/fixtures/express/routes.ts
@@ -149,7 +149,7 @@ const models: any = {
     properties: {
       "firstname": { "required": true, "typeName": "string" },
       "lastname": { "required": true, "typeName": "string" },
-      "age": { "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "* " }, "minimum": { "value": 1 }, "maximum": { "value": 100 } } },
+      "age": { "required": true, "typeName": "integer", "validators": { "minimum": { "value": 1 }, "maximum": { "value": 100 } } },
       "weight": { "required": true, "typeName": "float" },
       "human": { "required": true, "typeName": "boolean" },
       "gender": { "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
@@ -187,8 +187,8 @@ const models: any = {
   },
   "ValidateModel": {
     properties: {
-      "floatValue": { "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "Invalid float error message." } } },
-      "doubleValue": { "required": true, "typeName": "double", "validators": { "isDouble": { "errorMsg": "Invalid double error message." } } },
+      "floatValue": { "required": true, "typeName": "float" },
+      "doubleValue": { "required": true, "typeName": "double" },
       "intValue": { "required": true, "typeName": "integer" },
       "longValue": { "required": true, "typeName": "long", "validators": { "isLong": { "errorMsg": "Custom Required long number." } } },
       "booleanValue": { "required": true, "typeName": "boolean" },
@@ -225,7 +225,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.putModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -247,7 +247,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.putModelAtLocation.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -269,7 +269,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.putWithMultiReturn.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -292,7 +292,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.putWithId.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -315,7 +315,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.postModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -338,7 +338,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.updateModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -361,7 +361,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.postClassModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -383,7 +383,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.postModelAtLocation.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -405,7 +405,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.postWithMultiReturn.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -428,7 +428,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.postWithId.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -452,7 +452,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.postWithBodyAndQueryParams.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -475,7 +475,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getGenericRequest.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -498,7 +498,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.patchModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -520,7 +520,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.patchModelAtLocation.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -542,7 +542,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.patchWithMultiReturn.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -565,7 +565,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.patchWithId.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -587,7 +587,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -609,7 +609,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getCurrentModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -631,7 +631,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getClassModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -653,7 +653,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getMultipleModels.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -662,7 +662,7 @@ export function RegisterRoutes(app: any) {
   app.get('/v1/GetTest/:numberPathParam/:booleanPathParam/:stringPathParam',
     function(request: any, response: any, next: any) {
       const args = {
-        numberPathParam: { "in": "path", "name": "numberPathParam", "required": true, "typeName": "double", "validators": { "isDouble": { "errorMsg": "numberPathParam" }, "minimum": { "value": 1 }, "maximum": { "value": 10 } } },
+        numberPathParam: { "in": "path", "name": "numberPathParam", "required": true, "typeName": "double", "validators": { "minimum": { "value": 1 }, "maximum": { "value": 10 } } },
         stringPathParam: { "in": "path", "name": "stringPathParam", "required": true, "typeName": "string", "validators": { "minLength": { "value": 1 }, "maxLength": { "value": 10 } } },
         booleanPathParam: { "in": "path", "name": "booleanPathParam", "required": true, "typeName": "boolean" },
         booleanParam: { "in": "query", "name": "booleanParam", "required": true, "typeName": "boolean" },
@@ -682,7 +682,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getModelByParams.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -704,7 +704,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getResponseWithUnionTypeProperty.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -726,7 +726,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getUnionTypeResponse.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -749,7 +749,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getRequest.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -772,7 +772,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getByDataParam.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -794,7 +794,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getThrowsError.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -816,7 +816,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getGeneratesTags.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -839,7 +839,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getBuffer.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -861,7 +861,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getGenericModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -883,7 +883,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getGenericModelArray.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -905,7 +905,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getGenericPrimitive.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -927,7 +927,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getGenericPrimitiveArray.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -949,7 +949,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.deleteWithReturnValue.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -971,7 +971,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.deleteCurrent.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -999,7 +999,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getModelByParams.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1021,7 +1021,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1043,7 +1043,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.postMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1065,7 +1065,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.patchMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1087,7 +1087,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.putMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1109,7 +1109,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.deleteMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1131,7 +1131,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.description.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1153,7 +1153,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.tags.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1175,7 +1175,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.multiResponse.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1197,7 +1197,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.successResponse.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1221,7 +1221,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.apiSecurity.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1246,7 +1246,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.oauthSecurity.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1268,7 +1268,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.deprecatedMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1290,7 +1290,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.summaryMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1301,8 +1301,8 @@ export function RegisterRoutes(app: any) {
       const args = {
         firstname: { "in": "query", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "query", "name": "last_name", "required": true, "typeName": "string" },
-        age: { "in": "query", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "query", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "query", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "query", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "query", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "query", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1318,7 +1318,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getQuery.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1329,8 +1329,8 @@ export function RegisterRoutes(app: any) {
       const args = {
         firstname: { "in": "path", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "path", "name": "last_name", "required": true, "typeName": "string" },
-        age: { "in": "path", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "path", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "path", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "path", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "path", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "path", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1346,7 +1346,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getPath.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1357,8 +1357,8 @@ export function RegisterRoutes(app: any) {
       const args = {
         firstname: { "in": "header", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "header", "name": "last_name", "required": true, "typeName": "string" },
-        age: { "in": "header", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "header", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "header", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "header", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "header", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "header", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1374,7 +1374,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getHeader.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1397,7 +1397,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getRequest.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1420,7 +1420,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getBody.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1431,8 +1431,8 @@ export function RegisterRoutes(app: any) {
       const args = {
         firstname: { "in": "body-prop", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "body-prop", "name": "lastname", "required": true, "typeName": "string" },
-        age: { "in": "body-prop", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "body-prop", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "body-prop", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "body-prop", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "body-prop", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "body-prop", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1448,7 +1448,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getBodyProps.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1473,7 +1473,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.GetWithApi.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1498,7 +1498,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.GetWithApiForKoa.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1524,7 +1524,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.GetWithSecurity.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1533,8 +1533,8 @@ export function RegisterRoutes(app: any) {
   app.get('/v1/Validate/parameter/date',
     function(request: any, response: any, next: any) {
       const args = {
-        minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "date", "validators": { "isDate": { "errorMsg": "minDateValue" }, "minDate": { "value": "2018-01-01" } } },
-        maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "date", "validators": { "isDate": { "errorMsg": "maxDateValue" }, "maxDate": { "value": "2016-01-01" } } },
+        minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "datetime", "validators": { "minDate": { "value": "2018-01-01" } } },
+        maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "datetime", "validators": { "maxDate": { "value": "2016-01-01" } } },
       };
 
       let validatedArgs: any[] = [];
@@ -1548,7 +1548,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.dateValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1557,8 +1557,8 @@ export function RegisterRoutes(app: any) {
   app.get('/v1/Validate/parameter/datetime',
     function(request: any, response: any, next: any) {
       const args = {
-        minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "datetime", "validators": { "isDateTime": { "errorMsg": "minDateValue" }, "minDate": { "value": "2018-01-01T00:00:00" } } },
-        maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "datetime", "validators": { "isDateTime": { "errorMsg": "maxDateValue" }, "maxDate": { "value": "2016-01-01T00:00:00" } } },
+        minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "datetime", "validators": { "minDate": { "value": "2018-01-01T00:00:00" } } },
+        maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "datetime", "validators": { "maxDate": { "value": "2016-01-01T00:00:00" } } },
       };
 
       let validatedArgs: any[] = [];
@@ -1572,17 +1572,17 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.dateTimeValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
       promiseHandler(promise, statusCode, response, next);
     });
-  app.get('/v1/Validate/parameter/integer',
+  app.get('/v1/Validate/parameter/long',
     function(request: any, response: any, next: any) {
       const args = {
-        minValue: { "in": "query", "name": "minValue", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "minValue" }, "minimum": { "value": 5 } } },
-        maxValue: { "in": "query", "name": "maxValue", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "maxValue" }, "maximum": { "value": 3 } } },
+        minValue: { "in": "query", "name": "minValue", "required": true, "typeName": "long", "validators": { "minimum": { "value": 5 } } },
+        maxValue: { "in": "query", "name": "maxValue", "required": true, "typeName": "long", "validators": { "maximum": { "value": 3 } } },
       };
 
       let validatedArgs: any[] = [];
@@ -1596,17 +1596,17 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.longValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
       promiseHandler(promise, statusCode, response, next);
     });
-  app.get('/v1/Validate/parameter/float',
+  app.get('/v1/Validate/parameter/double',
     function(request: any, response: any, next: any) {
       const args = {
-        minValue: { "in": "query", "name": "minValue", "typeName": "float", "validators": { "isFloat": { "errorMsg": "minValue" }, "minimum": { "value": 5.5 } } },
-        maxValue: { "in": "query", "name": "maxValue", "typeName": "float", "validators": { "isFloat": { "errorMsg": "maxValue" }, "maximum": { "value": 3.5 } } },
+        minValue: { "in": "query", "name": "minValue", "typeName": "double", "validators": { "minimum": { "value": 5.5 } } },
+        maxValue: { "in": "query", "name": "maxValue", "typeName": "double", "validators": { "maximum": { "value": 3.5 } } },
       };
 
       let validatedArgs: any[] = [];
@@ -1620,7 +1620,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.doubleValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1629,7 +1629,7 @@ export function RegisterRoutes(app: any) {
   app.get('/v1/Validate/parameter/boolean',
     function(request: any, response: any, next: any) {
       const args = {
-        boolValue: { "in": "query", "name": "boolValue", "required": true, "typeName": "boolean", "validators": { "isBoolean": { "errorMsg": "boolValue" } } },
+        boolValue: { "in": "query", "name": "boolValue", "required": true, "typeName": "boolean" },
       };
 
       let validatedArgs: any[] = [];
@@ -1643,7 +1643,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.booleanValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1668,7 +1668,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.stringValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1691,7 +1691,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.customRequiredErrorMsg.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1714,7 +1714,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.customInvalidErrorMsg.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1737,7 +1737,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.bodyValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
diff --git a/tests/fixtures/hapi/routes.ts b/tests/fixtures/hapi/routes.ts
index 53faea51..3887e3ea 100644
--- a/tests/fixtures/hapi/routes.ts
+++ b/tests/fixtures/hapi/routes.ts
@@ -151,7 +151,7 @@ const models: any = {
     properties: {
       "firstname": { "required": true, "typeName": "string" },
       "lastname": { "required": true, "typeName": "string" },
-      "age": { "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "* " }, "minimum": { "value": 1 }, "maximum": { "value": 100 } } },
+      "age": { "required": true, "typeName": "integer", "validators": { "minimum": { "value": 1 }, "maximum": { "value": 100 } } },
       "weight": { "required": true, "typeName": "float" },
       "human": { "required": true, "typeName": "boolean" },
       "gender": { "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
@@ -189,8 +189,8 @@ const models: any = {
   },
   "ValidateModel": {
     properties: {
-      "floatValue": { "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "Invalid float error message." } } },
-      "doubleValue": { "required": true, "typeName": "double", "validators": { "isDouble": { "errorMsg": "Invalid double error message." } } },
+      "floatValue": { "required": true, "typeName": "float" },
+      "doubleValue": { "required": true, "typeName": "double" },
       "intValue": { "required": true, "typeName": "integer" },
       "longValue": { "required": true, "typeName": "long", "validators": { "isLong": { "errorMsg": "Custom Required long number." } } },
       "booleanValue": { "required": true, "typeName": "boolean" },
@@ -229,7 +229,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PutTestController();
 
         const promise = controller.putModel.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -255,7 +255,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PutTestController();
 
         const promise = controller.putModelAtLocation.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -281,7 +281,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PutTestController();
 
         const promise = controller.putWithMultiReturn.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -308,7 +308,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PutTestController();
 
         const promise = controller.putWithId.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -335,7 +335,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PostTestController();
 
         const promise = controller.postModel.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -362,7 +362,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PostTestController();
 
         const promise = controller.updateModel.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -389,7 +389,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PostTestController();
 
         const promise = controller.postClassModel.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -415,7 +415,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PostTestController();
 
         const promise = controller.postModelAtLocation.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -441,7 +441,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PostTestController();
 
         const promise = controller.postWithMultiReturn.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -468,7 +468,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PostTestController();
 
         const promise = controller.postWithId.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -496,7 +496,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PostTestController();
 
         const promise = controller.postWithBodyAndQueryParams.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -523,7 +523,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PostTestController();
 
         const promise = controller.getGenericRequest.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -550,7 +550,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PatchTestController();
 
         const promise = controller.patchModel.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -576,7 +576,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PatchTestController();
 
         const promise = controller.patchModelAtLocation.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -602,7 +602,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PatchTestController();
 
         const promise = controller.patchWithMultiReturn.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -629,7 +629,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new PatchTestController();
 
         const promise = controller.patchWithId.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -655,7 +655,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getModel.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -681,7 +681,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getCurrentModel.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -707,7 +707,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getClassModel.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -733,7 +733,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getMultipleModels.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -747,7 +747,7 @@ export function RegisterRoutes(server: hapi.Server) {
     config: {
       handler: (request: any, reply) => {
         const args = {
-          numberPathParam: { "in": "path", "name": "numberPathParam", "required": true, "typeName": "double", "validators": { "isDouble": { "errorMsg": "numberPathParam" }, "minimum": { "value": 1 }, "maximum": { "value": 10 } } },
+          numberPathParam: { "in": "path", "name": "numberPathParam", "required": true, "typeName": "double", "validators": { "minimum": { "value": 1 }, "maximum": { "value": 10 } } },
           stringPathParam: { "in": "path", "name": "stringPathParam", "required": true, "typeName": "string", "validators": { "minLength": { "value": 1 }, "maxLength": { "value": 10 } } },
           booleanPathParam: { "in": "path", "name": "booleanPathParam", "required": true, "typeName": "boolean" },
           booleanParam: { "in": "query", "name": "booleanParam", "required": true, "typeName": "boolean" },
@@ -766,7 +766,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getModelByParams.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -792,7 +792,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getResponseWithUnionTypeProperty.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -818,7 +818,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getUnionTypeResponse.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -845,7 +845,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getRequest.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -872,7 +872,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getByDataParam.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -898,7 +898,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getThrowsError.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -924,7 +924,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getGeneratesTags.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -951,7 +951,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getBuffer.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -977,7 +977,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getGenericModel.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1003,7 +1003,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getGenericModelArray.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1029,7 +1029,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getGenericPrimitive.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1055,7 +1055,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new GetTestController();
 
         const promise = controller.getGenericPrimitiveArray.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1081,7 +1081,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new DeleteTestController();
 
         const promise = controller.deleteWithReturnValue.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1107,7 +1107,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new DeleteTestController();
 
         const promise = controller.deleteCurrent.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1139,7 +1139,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new DeleteTestController();
 
         const promise = controller.getModelByParams.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1165,7 +1165,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.getMethod.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1191,7 +1191,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.postMethod.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1217,7 +1217,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.patchMethod.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1243,7 +1243,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.putMethod.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1269,7 +1269,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.deleteMethod.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1295,7 +1295,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.description.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1321,7 +1321,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.tags.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1347,7 +1347,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.multiResponse.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1373,7 +1373,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.successResponse.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1388,8 +1388,8 @@ export function RegisterRoutes(server: hapi.Server) {
       pre: [
         {
           method: authenticateMiddleware('api_key'
-          )        
-}
+          )
+        }
       ],
       handler: (request: any, reply) => {
         const args = {
@@ -1405,7 +1405,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.apiSecurity.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1421,8 +1421,8 @@ export function RegisterRoutes(server: hapi.Server) {
         {
           method: authenticateMiddleware('tsoa_auth'
             , ["write:pets", "read:pets"]
-          )
-        }
+          )        
+}
       ],
       handler: (request: any, reply) => {
         const args = {
@@ -1438,7 +1438,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.oauthSecurity.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1464,7 +1464,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.deprecatedMethod.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1490,7 +1490,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new MethodController();
 
         const promise = controller.summaryMethod.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1506,8 +1506,8 @@ export function RegisterRoutes(server: hapi.Server) {
         const args = {
           firstname: { "in": "query", "name": "firstname", "required": true, "typeName": "string" },
           lastname: { "in": "query", "name": "last_name", "required": true, "typeName": "string" },
-          age: { "in": "query", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-          weight: { "in": "query", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+          age: { "in": "query", "name": "age", "required": true, "typeName": "integer" },
+          weight: { "in": "query", "name": "weight", "required": true, "typeName": "float" },
           human: { "in": "query", "name": "human", "required": true, "typeName": "boolean" },
           gender: { "in": "query", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
         };
@@ -1522,7 +1522,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ParameterController();
 
         const promise = controller.getQuery.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1538,8 +1538,8 @@ export function RegisterRoutes(server: hapi.Server) {
         const args = {
           firstname: { "in": "path", "name": "firstname", "required": true, "typeName": "string" },
           lastname: { "in": "path", "name": "last_name", "required": true, "typeName": "string" },
-          age: { "in": "path", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-          weight: { "in": "path", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+          age: { "in": "path", "name": "age", "required": true, "typeName": "integer" },
+          weight: { "in": "path", "name": "weight", "required": true, "typeName": "float" },
           human: { "in": "path", "name": "human", "required": true, "typeName": "boolean" },
           gender: { "in": "path", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
         };
@@ -1554,7 +1554,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ParameterController();
 
         const promise = controller.getPath.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1570,8 +1570,8 @@ export function RegisterRoutes(server: hapi.Server) {
         const args = {
           firstname: { "in": "header", "name": "firstname", "required": true, "typeName": "string" },
           lastname: { "in": "header", "name": "last_name", "required": true, "typeName": "string" },
-          age: { "in": "header", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-          weight: { "in": "header", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+          age: { "in": "header", "name": "age", "required": true, "typeName": "integer" },
+          weight: { "in": "header", "name": "weight", "required": true, "typeName": "float" },
           human: { "in": "header", "name": "human", "required": true, "typeName": "boolean" },
           gender: { "in": "header", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
         };
@@ -1586,7 +1586,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ParameterController();
 
         const promise = controller.getHeader.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1613,7 +1613,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ParameterController();
 
         const promise = controller.getRequest.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1640,7 +1640,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ParameterController();
 
         const promise = controller.getBody.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1656,8 +1656,8 @@ export function RegisterRoutes(server: hapi.Server) {
         const args = {
           firstname: { "in": "body-prop", "name": "firstname", "required": true, "typeName": "string" },
           lastname: { "in": "body-prop", "name": "lastname", "required": true, "typeName": "string" },
-          age: { "in": "body-prop", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-          weight: { "in": "body-prop", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+          age: { "in": "body-prop", "name": "age", "required": true, "typeName": "integer" },
+          weight: { "in": "body-prop", "name": "weight", "required": true, "typeName": "float" },
           human: { "in": "body-prop", "name": "human", "required": true, "typeName": "boolean" },
           gender: { "in": "body-prop", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
         };
@@ -1672,7 +1672,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ParameterController();
 
         const promise = controller.getBodyProps.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1687,8 +1687,8 @@ export function RegisterRoutes(server: hapi.Server) {
       pre: [
         {
           method: authenticateMiddleware('api_key'
-          )        
-}
+          )
+        }
       ],
       handler: (request: any, reply) => {
         const args = {
@@ -1705,7 +1705,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new SecurityTestController();
 
         const promise = controller.GetWithApi.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1720,8 +1720,8 @@ export function RegisterRoutes(server: hapi.Server) {
       pre: [
         {
           method: authenticateMiddleware('api_key'
-          )        
-}
+          )
+        }
       ],
       handler: (request: any, reply) => {
         const args = {
@@ -1738,7 +1738,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new SecurityTestController();
 
         const promise = controller.GetWithApiForKoa.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1754,8 +1754,8 @@ export function RegisterRoutes(server: hapi.Server) {
         {
           method: authenticateMiddleware('tsoa_auth'
             , ["write:pets", "read:pets"]
-          )
-        }
+          )        
+}
       ],
       handler: (request: any, reply) => {
         const args = {
@@ -1772,7 +1772,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new SecurityTestController();
 
         const promise = controller.GetWithSecurity.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1786,8 +1786,8 @@ export function RegisterRoutes(server: hapi.Server) {
     config: {
       handler: (request: any, reply) => {
         const args = {
-          minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "date", "validators": { "isDate": { "errorMsg": "minDateValue" }, "minDate": { "value": "2018-01-01" } } },
-          maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "date", "validators": { "isDate": { "errorMsg": "maxDateValue" }, "maxDate": { "value": "2016-01-01" } } },
+          minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "datetime", "validators": { "minDate": { "value": "2018-01-01" } } },
+          maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "datetime", "validators": { "maxDate": { "value": "2016-01-01" } } },
         };
 
         let validatedArgs: any[] = [];
@@ -1800,7 +1800,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ValidateController();
 
         const promise = controller.dateValidate.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1814,8 +1814,8 @@ export function RegisterRoutes(server: hapi.Server) {
     config: {
       handler: (request: any, reply) => {
         const args = {
-          minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "datetime", "validators": { "isDateTime": { "errorMsg": "minDateValue" }, "minDate": { "value": "2018-01-01T00:00:00" } } },
-          maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "datetime", "validators": { "isDateTime": { "errorMsg": "maxDateValue" }, "maxDate": { "value": "2016-01-01T00:00:00" } } },
+          minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "datetime", "validators": { "minDate": { "value": "2018-01-01T00:00:00" } } },
+          maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "datetime", "validators": { "maxDate": { "value": "2016-01-01T00:00:00" } } },
         };
 
         let validatedArgs: any[] = [];
@@ -1828,7 +1828,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ValidateController();
 
         const promise = controller.dateTimeValidate.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1838,12 +1838,12 @@ export function RegisterRoutes(server: hapi.Server) {
   });
   server.route({
     method: 'get',
-    path: '/v1/Validate/parameter/integer',
+    path: '/v1/Validate/parameter/long',
     config: {
       handler: (request: any, reply) => {
         const args = {
-          minValue: { "in": "query", "name": "minValue", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "minValue" }, "minimum": { "value": 5 } } },
-          maxValue: { "in": "query", "name": "maxValue", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "maxValue" }, "maximum": { "value": 3 } } },
+          minValue: { "in": "query", "name": "minValue", "required": true, "typeName": "long", "validators": { "minimum": { "value": 5 } } },
+          maxValue: { "in": "query", "name": "maxValue", "required": true, "typeName": "long", "validators": { "maximum": { "value": 3 } } },
         };
 
         let validatedArgs: any[] = [];
@@ -1856,7 +1856,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ValidateController();
 
         const promise = controller.longValidate.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1866,12 +1866,12 @@ export function RegisterRoutes(server: hapi.Server) {
   });
   server.route({
     method: 'get',
-    path: '/v1/Validate/parameter/float',
+    path: '/v1/Validate/parameter/double',
     config: {
       handler: (request: any, reply) => {
         const args = {
-          minValue: { "in": "query", "name": "minValue", "typeName": "float", "validators": { "isFloat": { "errorMsg": "minValue" }, "minimum": { "value": 5.5 } } },
-          maxValue: { "in": "query", "name": "maxValue", "typeName": "float", "validators": { "isFloat": { "errorMsg": "maxValue" }, "maximum": { "value": 3.5 } } },
+          minValue: { "in": "query", "name": "minValue", "typeName": "double", "validators": { "minimum": { "value": 5.5 } } },
+          maxValue: { "in": "query", "name": "maxValue", "typeName": "double", "validators": { "maximum": { "value": 3.5 } } },
         };
 
         let validatedArgs: any[] = [];
@@ -1884,7 +1884,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ValidateController();
 
         const promise = controller.doubleValidate.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1898,7 +1898,7 @@ export function RegisterRoutes(server: hapi.Server) {
     config: {
       handler: (request: any, reply) => {
         const args = {
-          boolValue: { "in": "query", "name": "boolValue", "required": true, "typeName": "boolean", "validators": { "isBoolean": { "errorMsg": "boolValue" } } },
+          boolValue: { "in": "query", "name": "boolValue", "required": true, "typeName": "boolean" },
         };
 
         let validatedArgs: any[] = [];
@@ -1911,7 +1911,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ValidateController();
 
         const promise = controller.booleanValidate.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1940,7 +1940,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ValidateController();
 
         const promise = controller.stringValidate.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1967,7 +1967,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ValidateController();
 
         const promise = controller.customRequiredErrorMsg.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -1994,7 +1994,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ValidateController();
 
         const promise = controller.customInvalidErrorMsg.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
@@ -2021,7 +2021,7 @@ export function RegisterRoutes(server: hapi.Server) {
         const controller = new ValidateController();
 
         const promise = controller.bodyValidate.apply(controller, validatedArgs);
-        let statusCode: any;
+        let statusCode: number | undefined = undefined;
         if (controller instanceof Controller) {
           statusCode = (controller as Controller).getStatus();
         }
diff --git a/tests/fixtures/inversify/routes.ts b/tests/fixtures/inversify/routes.ts
index e83f6e64..d93a6786 100644
--- a/tests/fixtures/inversify/routes.ts
+++ b/tests/fixtures/inversify/routes.ts
@@ -108,7 +108,7 @@ export function RegisterRoutes(app: any) {
 
 
       const promise = controller.getModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
diff --git a/tests/fixtures/koa/routes.ts b/tests/fixtures/koa/routes.ts
index 7a3d4a76..0b3851f3 100644
--- a/tests/fixtures/koa/routes.ts
+++ b/tests/fixtures/koa/routes.ts
@@ -150,7 +150,7 @@ const models: any = {
     properties: {
       "firstname": { "required": true, "typeName": "string" },
       "lastname": { "required": true, "typeName": "string" },
-      "age": { "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "* " }, "minimum": { "value": 1 }, "maximum": { "value": 100 } } },
+      "age": { "required": true, "typeName": "integer", "validators": { "minimum": { "value": 1 }, "maximum": { "value": 100 } } },
       "weight": { "required": true, "typeName": "float" },
       "human": { "required": true, "typeName": "boolean" },
       "gender": { "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
@@ -188,8 +188,8 @@ const models: any = {
   },
   "ValidateModel": {
     properties: {
-      "floatValue": { "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "Invalid float error message." } } },
-      "doubleValue": { "required": true, "typeName": "double", "validators": { "isDouble": { "errorMsg": "Invalid double error message." } } },
+      "floatValue": { "required": true, "typeName": "float" },
+      "doubleValue": { "required": true, "typeName": "double" },
       "intValue": { "required": true, "typeName": "integer" },
       "longValue": { "required": true, "typeName": "long", "validators": { "isLong": { "errorMsg": "Custom Required long number." } } },
       "booleanValue": { "required": true, "typeName": "boolean" },
@@ -227,7 +227,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PutTestController();
 
       const promise = controller.putModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -251,7 +251,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PutTestController();
 
       const promise = controller.putModelAtLocation.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -275,7 +275,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PutTestController();
 
       const promise = controller.putWithMultiReturn.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -300,7 +300,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PutTestController();
 
       const promise = controller.putWithId.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -325,7 +325,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PostTestController();
 
       const promise = controller.postModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -350,7 +350,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PostTestController();
 
       const promise = controller.updateModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -375,7 +375,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PostTestController();
 
       const promise = controller.postClassModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -399,7 +399,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PostTestController();
 
       const promise = controller.postModelAtLocation.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -423,7 +423,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PostTestController();
 
       const promise = controller.postWithMultiReturn.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -448,7 +448,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PostTestController();
 
       const promise = controller.postWithId.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -474,7 +474,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PostTestController();
 
       const promise = controller.postWithBodyAndQueryParams.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -499,7 +499,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PostTestController();
 
       const promise = controller.getGenericRequest.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -524,7 +524,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PatchTestController();
 
       const promise = controller.patchModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -548,7 +548,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PatchTestController();
 
       const promise = controller.patchModelAtLocation.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -572,7 +572,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PatchTestController();
 
       const promise = controller.patchWithMultiReturn.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -597,7 +597,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new PatchTestController();
 
       const promise = controller.patchWithId.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -621,7 +621,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -645,7 +645,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getCurrentModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -669,7 +669,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getClassModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -693,7 +693,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getMultipleModels.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -703,7 +703,7 @@ export function RegisterRoutes(router: KoaRouter) {
   router.get('/v1/GetTest/:numberPathParam/:booleanPathParam/:stringPathParam',
     async (context, next) => {
       const args = {
-        numberPathParam: { "in": "path", "name": "numberPathParam", "required": true, "typeName": "double", "validators": { "isDouble": { "errorMsg": "numberPathParam" }, "minimum": { "value": 1 }, "maximum": { "value": 10 } } },
+        numberPathParam: { "in": "path", "name": "numberPathParam", "required": true, "typeName": "double", "validators": { "minimum": { "value": 1 }, "maximum": { "value": 10 } } },
         stringPathParam: { "in": "path", "name": "stringPathParam", "required": true, "typeName": "string", "validators": { "minLength": { "value": 1 }, "maxLength": { "value": 10 } } },
         booleanPathParam: { "in": "path", "name": "booleanPathParam", "required": true, "typeName": "boolean" },
         booleanParam: { "in": "query", "name": "booleanParam", "required": true, "typeName": "boolean" },
@@ -724,7 +724,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getModelByParams.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -748,7 +748,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getResponseWithUnionTypeProperty.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -772,7 +772,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getUnionTypeResponse.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -797,7 +797,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getRequest.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -822,7 +822,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getByDataParam.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -846,7 +846,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getThrowsError.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -870,7 +870,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getGeneratesTags.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -895,7 +895,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getBuffer.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -919,7 +919,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getGenericModel.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -943,7 +943,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getGenericModelArray.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -967,7 +967,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getGenericPrimitive.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -991,7 +991,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new GetTestController();
 
       const promise = controller.getGenericPrimitiveArray.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1015,7 +1015,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new DeleteTestController();
 
       const promise = controller.deleteWithReturnValue.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1039,7 +1039,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new DeleteTestController();
 
       const promise = controller.deleteCurrent.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1069,7 +1069,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new DeleteTestController();
 
       const promise = controller.getModelByParams.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1093,7 +1093,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.getMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1117,7 +1117,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.postMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1141,7 +1141,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.patchMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1165,7 +1165,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.putMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1189,7 +1189,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.deleteMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1213,7 +1213,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.description.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1237,7 +1237,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.tags.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1261,7 +1261,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.multiResponse.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1285,7 +1285,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.successResponse.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1311,7 +1311,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.apiSecurity.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1338,7 +1338,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.oauthSecurity.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1362,7 +1362,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.deprecatedMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1386,7 +1386,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new MethodController();
 
       const promise = controller.summaryMethod.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1398,8 +1398,8 @@ export function RegisterRoutes(router: KoaRouter) {
       const args = {
         firstname: { "in": "query", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "query", "name": "last_name", "required": true, "typeName": "string" },
-        age: { "in": "query", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "query", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "query", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "query", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "query", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "query", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1416,7 +1416,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ParameterController();
 
       const promise = controller.getQuery.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1428,8 +1428,8 @@ export function RegisterRoutes(router: KoaRouter) {
       const args = {
         firstname: { "in": "path", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "path", "name": "last_name", "required": true, "typeName": "string" },
-        age: { "in": "path", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "path", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "path", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "path", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "path", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "path", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1446,7 +1446,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ParameterController();
 
       const promise = controller.getPath.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1458,8 +1458,8 @@ export function RegisterRoutes(router: KoaRouter) {
       const args = {
         firstname: { "in": "header", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "header", "name": "last_name", "required": true, "typeName": "string" },
-        age: { "in": "header", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "header", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "header", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "header", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "header", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "header", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1476,7 +1476,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ParameterController();
 
       const promise = controller.getHeader.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1501,7 +1501,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ParameterController();
 
       const promise = controller.getRequest.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1526,7 +1526,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ParameterController();
 
       const promise = controller.getBody.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1538,8 +1538,8 @@ export function RegisterRoutes(router: KoaRouter) {
       const args = {
         firstname: { "in": "body-prop", "name": "firstname", "required": true, "typeName": "string" },
         lastname: { "in": "body-prop", "name": "lastname", "required": true, "typeName": "string" },
-        age: { "in": "body-prop", "name": "age", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "age" } } },
-        weight: { "in": "body-prop", "name": "weight", "required": true, "typeName": "float", "validators": { "isFloat": { "errorMsg": "weight" } } },
+        age: { "in": "body-prop", "name": "age", "required": true, "typeName": "integer" },
+        weight: { "in": "body-prop", "name": "weight", "required": true, "typeName": "float" },
         human: { "in": "body-prop", "name": "human", "required": true, "typeName": "boolean" },
         gender: { "in": "body-prop", "name": "gender", "required": true, "typeName": "enum", "enumMembers": ["MALE", "FEMALE"] },
       };
@@ -1556,7 +1556,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ParameterController();
 
       const promise = controller.getBodyProps.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1583,7 +1583,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new SecurityTestController();
 
       const promise = controller.GetWithApi.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1610,7 +1610,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new SecurityTestController();
 
       const promise = controller.GetWithApiForKoa.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1638,7 +1638,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new SecurityTestController();
 
       const promise = controller.GetWithSecurity.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1648,8 +1648,8 @@ export function RegisterRoutes(router: KoaRouter) {
   router.get('/v1/Validate/parameter/date',
     async (context, next) => {
       const args = {
-        minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "date", "validators": { "isDate": { "errorMsg": "minDateValue" }, "minDate": { "value": "2018-01-01" } } },
-        maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "date", "validators": { "isDate": { "errorMsg": "maxDateValue" }, "maxDate": { "value": "2016-01-01" } } },
+        minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "datetime", "validators": { "minDate": { "value": "2018-01-01" } } },
+        maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "datetime", "validators": { "maxDate": { "value": "2016-01-01" } } },
       };
 
       let validatedArgs: any[] = [];
@@ -1664,7 +1664,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ValidateController();
 
       const promise = controller.dateValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1674,8 +1674,8 @@ export function RegisterRoutes(router: KoaRouter) {
   router.get('/v1/Validate/parameter/datetime',
     async (context, next) => {
       const args = {
-        minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "datetime", "validators": { "isDateTime": { "errorMsg": "minDateValue" }, "minDate": { "value": "2018-01-01T00:00:00" } } },
-        maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "datetime", "validators": { "isDateTime": { "errorMsg": "maxDateValue" }, "maxDate": { "value": "2016-01-01T00:00:00" } } },
+        minDateValue: { "in": "query", "name": "minDateValue", "required": true, "typeName": "datetime", "validators": { "minDate": { "value": "2018-01-01T00:00:00" } } },
+        maxDateValue: { "in": "query", "name": "maxDateValue", "required": true, "typeName": "datetime", "validators": { "maxDate": { "value": "2016-01-01T00:00:00" } } },
       };
 
       let validatedArgs: any[] = [];
@@ -1690,18 +1690,18 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ValidateController();
 
       const promise = controller.dateTimeValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
 
       return promiseHandler(promise, statusCode, context, next);
     });
-  router.get('/v1/Validate/parameter/integer',
+  router.get('/v1/Validate/parameter/long',
     async (context, next) => {
       const args = {
-        minValue: { "in": "query", "name": "minValue", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "minValue" }, "minimum": { "value": 5 } } },
-        maxValue: { "in": "query", "name": "maxValue", "required": true, "typeName": "integer", "validators": { "isInt": { "errorMsg": "maxValue" }, "maximum": { "value": 3 } } },
+        minValue: { "in": "query", "name": "minValue", "required": true, "typeName": "long", "validators": { "minimum": { "value": 5 } } },
+        maxValue: { "in": "query", "name": "maxValue", "required": true, "typeName": "long", "validators": { "maximum": { "value": 3 } } },
       };
 
       let validatedArgs: any[] = [];
@@ -1716,18 +1716,18 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ValidateController();
 
       const promise = controller.longValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
 
       return promiseHandler(promise, statusCode, context, next);
     });
-  router.get('/v1/Validate/parameter/float',
+  router.get('/v1/Validate/parameter/double',
     async (context, next) => {
       const args = {
-        minValue: { "in": "query", "name": "minValue", "typeName": "float", "validators": { "isFloat": { "errorMsg": "minValue" }, "minimum": { "value": 5.5 } } },
-        maxValue: { "in": "query", "name": "maxValue", "typeName": "float", "validators": { "isFloat": { "errorMsg": "maxValue" }, "maximum": { "value": 3.5 } } },
+        minValue: { "in": "query", "name": "minValue", "typeName": "double", "validators": { "minimum": { "value": 5.5 } } },
+        maxValue: { "in": "query", "name": "maxValue", "typeName": "double", "validators": { "maximum": { "value": 3.5 } } },
       };
 
       let validatedArgs: any[] = [];
@@ -1742,7 +1742,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ValidateController();
 
       const promise = controller.doubleValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1752,7 +1752,7 @@ export function RegisterRoutes(router: KoaRouter) {
   router.get('/v1/Validate/parameter/boolean',
     async (context, next) => {
       const args = {
-        boolValue: { "in": "query", "name": "boolValue", "required": true, "typeName": "boolean", "validators": { "isBoolean": { "errorMsg": "boolValue" } } },
+        boolValue: { "in": "query", "name": "boolValue", "required": true, "typeName": "boolean" },
       };
 
       let validatedArgs: any[] = [];
@@ -1767,7 +1767,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ValidateController();
 
       const promise = controller.booleanValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1794,7 +1794,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ValidateController();
 
       const promise = controller.stringValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1819,7 +1819,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ValidateController();
 
       const promise = controller.customRequiredErrorMsg.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1844,7 +1844,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ValidateController();
 
       const promise = controller.customInvalidErrorMsg.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
@@ -1869,7 +1869,7 @@ export function RegisterRoutes(router: KoaRouter) {
       const controller = new ValidateController();
 
       const promise = controller.bodyValidate.apply(controller, validatedArgs);
-      let statusCode: any;
+      let statusCode: number | undefined = undefined;
       if (controller instanceof Controller) {
         statusCode = (controller as Controller).getStatus();
       }
diff --git a/tests/fixtures/testModel.ts b/tests/fixtures/testModel.ts
index 4faed098..27a9199e 100644
--- a/tests/fixtures/testModel.ts
+++ b/tests/fixtures/testModel.ts
@@ -1,3 +1,5 @@
+import { MinLength, MaxLength, MinItems, MaxItems, Pattern, Minimum, Maximum, UniqueItems } from './../../src/decorators/validations';
+import { IsInt, IsFloat, IsDouble, IsLong, IsArray, IsDate, IsDateTime, IsBoolean } from './../../src/decorators/data-types';
 /**
  * This is a description of a model
  */
@@ -97,15 +99,11 @@ export interface UserResponseModel {
 export class ParameterTestModel {
   public firstname: string;
   public lastname: string;
-  /**
-   * @isInt
-   * @minimum 1
-   * @maximum 100
-   */
+  @IsInt()
+  @Minimum(1)
+  @Maximum(100)
   public age: number;
-  /**
-   * @isFloat
-   */
+  @IsFloat()
   public weight: number;
   public human: boolean;
   public gender: Gender;
@@ -116,71 +114,39 @@ export class ValidateCustomErrorModel {
 }
 
 export class ValidateModel {
-  /**
-   * @isFloat Invalid float error message.
-   */
+  @IsFloat()
   public floatValue: number;
-  /**
-   * @isDouble Invalid double error message.
-   */
+  @IsDouble()
   public doubleValue: number;
-  /**
-   * @isInt
-   */
+  @IsInt()
   public intValue: number;
-  /**
-   * @isLong Custom Required long number.
-   */
+  @IsLong('Custom Required long number.')
   public longValue: number;
-  /**
-   * @isBoolean
-   */
+  @IsBoolean()
   public booleanValue: boolean;
-  /**
-   * @isArray
-   */
+  @IsArray()
   public arrayValue: number[];
-  /**
-   * @isDate
-   */
+  @IsDate()
   public dateValue: Date;
-  /**
-   * @isDateTime
-   */
+  @IsDateTime()
   public datetimeValue: Date;
 
-  /**
-   * @maximum 10
-   */
+  @Maximum(10)
   public numberMax10: number;
-  /**
-   * @minimum 5
-   */
+  @Minimum(5)
   public numberMin5: number;
-  /**
-   * @maxLength 10
-   */
+  @MaxLength(10)
   public stringMax10Lenght: string;
-  /**
-   * @minLength 5
-   */
+  @MinLength(5)
   public stringMin5Lenght: string;
-  /**
-   *  @pattern ^[a-zA-Z]+$
-   */
+  @Pattern('^[a-zA-Z]+$')
   public stringPatternAZaz: string;
 
-  /**
-   * @maxItems 5
-   */
+  @MaxItems(5)
   public arrayMax5Item: number[];
-  /**
-   * @minItems 2
-   */
+  @MinItems(2)
   public arrayMin2Item: number[];
-  /**
-   * @uniqueItems
-   */
+  @UniqueItems()
   public arrayUniqueItem: number[];
 }
 
@@ -207,16 +173,13 @@ export class TestClassBaseModel {
 export class TestClassModel extends TestClassBaseModel {
   /**
   * This is a description of a public string property
-  *
-  * @minLength 3
-  * @maxLength 20
-  * @pattern ^[a-zA-Z]+$
   */
+  @MinLength(3)
+  @MaxLength(20)
+  @Pattern('^[a-zA-Z]+$')
   public publicStringProperty: string;
-  /**
-   * @minLength 0
-   * @maxLength 10
-   */
+  @MinLength(0)
+  @MaxLength(10)
   public optionalPublicStringProperty?: string;
   /* tslint:disable-next-line */
   stringProperty: string;
diff --git a/tests/integration/express-server.spec.ts b/tests/integration/express-server.spec.ts
index efbf1f45..4c288543 100644
--- a/tests/integration/express-server.spec.ts
+++ b/tests/integration/express-server.spec.ts
@@ -223,17 +223,17 @@ describe('Express Server', () => {
       }, 400);
     });
 
-    it('should valid max and min validation of integer type', () => {
-      return verifyGetRequest(basePath + `/Validate/parameter/integer?minValue=6&maxValue=2`, (err, res) => {
+    it('should valid max and min validation of long type', () => {
+      return verifyGetRequest(basePath + `/Validate/parameter/long?minValue=6&maxValue=2`, (err, res) => {
         const { body } = res;
         expect(body.minValue).to.equal(6);
         expect(body.maxValue).to.equal(2);
       }, 200);
     });
 
-    it('should invalid max and min validation of integer type', () => {
+    it('should invalid max and min validation of long type', () => {
       const value = 4;
-      return verifyGetRequest(basePath + `/Validate/parameter/integer?minValue=${value}&maxValue=${value}`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/long?minValue=${value}&maxValue=${value}`, (err, res) => {
         const body = JSON.parse(err.text);
         expect(body.fields.minValue.message).to.equal('min 5');
         expect(body.fields.minValue.value).to.equal(value);
@@ -242,17 +242,17 @@ describe('Express Server', () => {
       }, 400);
     });
 
-    it('should valid max and min validation of float type', () => {
-      return verifyGetRequest(basePath + `/Validate/parameter/float?minValue=5.6&maxValue=3.4`, (err, res) => {
+    it('should valid max and min validation of double type', () => {
+      return verifyGetRequest(basePath + `/Validate/parameter/double?minValue=5.6&maxValue=3.4`, (err, res) => {
         const { body } = res;
         expect(body.minValue).to.equal(5.6);
         expect(body.maxValue).to.equal(3.4);
       }, 200);
     });
 
-    it('should invalid max and min validation of float type', () => {
+    it('should invalid max and min validation of double type', () => {
       const value = 4.5;
-      return verifyGetRequest(basePath + `/Validate/parameter/float?minValue=${value}&maxValue=${value}`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/double?minValue=${value}&maxValue=${value}`, (err, res) => {
         const body = JSON.parse(err.text);
         expect(body.fields.minValue.message).to.equal('min 5.5');
         expect(body.fields.minValue.value).to.equal(value);
@@ -371,9 +371,9 @@ describe('Express Server', () => {
       return verifyPostRequest(basePath + `/Validate/body`, bodyModel, (err, res) => {
         const body = JSON.parse(err.text);
 
-        expect(body.fields.floatValue.message).to.equal('Invalid float error message.');
+        expect(body.fields.floatValue.message).to.equal('Invalid float number.');
         expect(body.fields.floatValue.value).to.equal(bodyModel.floatValue);
-        expect(body.fields.doubleValue.message).to.equal('Invalid double error message.');
+        expect(body.fields.doubleValue.message).to.equal('Invalid float number.');
         expect(body.fields.doubleValue.value).to.equal(bodyModel.doubleValue);
         expect(body.fields.intValue.message).to.equal('Invalid integer number.');
         expect(body.fields.intValue.value).to.equal(bodyModel.intValue);
diff --git a/tests/integration/hapi-server.spec.ts b/tests/integration/hapi-server.spec.ts
index 14d1cce1..2f5d4536 100644
--- a/tests/integration/hapi-server.spec.ts
+++ b/tests/integration/hapi-server.spec.ts
@@ -210,7 +210,7 @@ describe('Hapi Server', () => {
     });
 
     it('should valid max and min validation of long type', () => {
-      return verifyGetRequest(basePath + `/Validate/parameter/integer?minValue=6&maxValue=2`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/long?minValue=6&maxValue=2`, (err, res) => {
         const { body } = res;
         expect(body.minValue).to.equal(6);
         expect(body.maxValue).to.equal(2);
@@ -219,7 +219,7 @@ describe('Hapi Server', () => {
 
     it('should invalid max and min validation of long type', () => {
       const value = 4;
-      return verifyGetRequest(basePath + `/Validate/parameter/integer?minValue=${value}&maxValue=${value}`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/long?minValue=${value}&maxValue=${value}`, (err, res) => {
         const body = JSON.parse(err.text);
         expect(body.fields.minValue.message).to.equal('min 5');
         expect(body.fields.minValue.value).to.equal(value);
@@ -229,7 +229,7 @@ describe('Hapi Server', () => {
     });
 
     it('should valid max and min validation of double type', () => {
-      return verifyGetRequest(basePath + `/Validate/parameter/float?minValue=5.6&maxValue=3.4`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/double?minValue=5.6&maxValue=3.4`, (err, res) => {
         const { body } = res;
         expect(body.minValue).to.equal(5.6);
         expect(body.maxValue).to.equal(3.4);
@@ -238,7 +238,7 @@ describe('Hapi Server', () => {
 
     it('should invalid max and min validation of double type', () => {
       const value = 4.5;
-      return verifyGetRequest(basePath + `/Validate/parameter/float?minValue=${value}&maxValue=${value}`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/double?minValue=${value}&maxValue=${value}`, (err, res) => {
         const body = JSON.parse(err.text);
         expect(body.fields.minValue.message).to.equal('min 5.5');
         expect(body.fields.minValue.value).to.equal(value);
@@ -357,9 +357,9 @@ describe('Hapi Server', () => {
       return verifyPostRequest(basePath + `/Validate/body`, bodyModel, (err, res) => {
         const body = JSON.parse(err.text);
 
-        expect(body.fields.floatValue.message).to.equal('Invalid float error message.');
+        expect(body.fields.floatValue.message).to.equal('Invalid float number.');
         expect(body.fields.floatValue.value).to.equal(bodyModel.floatValue);
-        expect(body.fields.doubleValue.message).to.equal('Invalid double error message.');
+        expect(body.fields.doubleValue.message).to.equal('Invalid float number.');
         expect(body.fields.doubleValue.value).to.equal(bodyModel.doubleValue);
         expect(body.fields.intValue.message).to.equal('Invalid integer number.');
         expect(body.fields.intValue.value).to.equal(bodyModel.intValue);
diff --git a/tests/integration/koa-server.spec.ts b/tests/integration/koa-server.spec.ts
index a67acf8d..d2bf7452 100644
--- a/tests/integration/koa-server.spec.ts
+++ b/tests/integration/koa-server.spec.ts
@@ -187,7 +187,7 @@ describe('Koa Server', () => {
     });
 
     it('should valid max and min validation of long type', () => {
-      return verifyGetRequest(basePath + `/Validate/parameter/integer?minValue=6&maxValue=2`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/long?minValue=6&maxValue=2`, (err, res) => {
         const { body } = res;
         expect(body.minValue).to.equal(6);
         expect(body.maxValue).to.equal(2);
@@ -196,7 +196,7 @@ describe('Koa Server', () => {
 
     it('should invalid max and min validation of long type', () => {
       const value = 4;
-      return verifyGetRequest(basePath + `/Validate/parameter/integer?minValue=${value}&maxValue=${value}`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/long?minValue=${value}&maxValue=${value}`, (err, res) => {
         const body = JSON.parse(err.text);
         expect(body.fields.minValue.message).to.equal('min 5');
         expect(body.fields.minValue.value).to.equal(value);
@@ -206,7 +206,7 @@ describe('Koa Server', () => {
     });
 
     it('should valid max and min validation of double type', () => {
-      return verifyGetRequest(basePath + `/Validate/parameter/float?minValue=5.6&maxValue=3.4`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/double?minValue=5.6&maxValue=3.4`, (err, res) => {
         const { body } = res;
         expect(body.minValue).to.equal(5.6);
         expect(body.maxValue).to.equal(3.4);
@@ -215,7 +215,7 @@ describe('Koa Server', () => {
 
     it('should invalid max and min validation of double type', () => {
       const value = 4.5;
-      return verifyGetRequest(basePath + `/Validate/parameter/float?minValue=${value}&maxValue=${value}`, (err, res) => {
+      return verifyGetRequest(basePath + `/Validate/parameter/double?minValue=${value}&maxValue=${value}`, (err, res) => {
         const body = JSON.parse(err.text);
         expect(body.fields.minValue.message).to.equal('min 5.5');
         expect(body.fields.minValue.value).to.equal(value);
@@ -334,9 +334,9 @@ describe('Koa Server', () => {
       return verifyPostRequest(basePath + `/Validate/body`, bodyModel, (err, res) => {
         const body = JSON.parse(err.text);
 
-        expect(body.fields.floatValue.message).to.equal('Invalid float error message.');
+        expect(body.fields.floatValue.message).to.equal('Invalid float number.');
         expect(body.fields.floatValue.value).to.equal(bodyModel.floatValue);
-        expect(body.fields.doubleValue.message).to.equal('Invalid double error message.');
+        expect(body.fields.doubleValue.message).to.equal('Invalid float number.');
         expect(body.fields.doubleValue.value).to.equal(bodyModel.doubleValue);
         expect(body.fields.intValue.message).to.equal('Invalid integer number.');
         expect(body.fields.intValue.value).to.equal(bodyModel.intValue);