From 84851ad73d211188c7384d7d00fb1523dbf0ebcb Mon Sep 17 00:00:00 2001 From: Peter Kinnaird Date: Mon, 26 Feb 2018 16:07:24 +0000 Subject: [PATCH] Mark explicit type as string, to fix JSON parse errors in routing-controllers when using a string as a Primary Key. --- src/decorators/EntityFromParam.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/decorators/EntityFromParam.ts b/src/decorators/EntityFromParam.ts index 247f6bd..d89e7b9 100644 --- a/src/decorators/EntityFromParam.ts +++ b/src/decorators/EntityFromParam.ts @@ -17,6 +17,7 @@ export function EntityFromParam(paramName: string, options?: EntityParamOptions) index: index, name: paramName, type: "param", + explicitType: "string", parse: options && options.parse, required: options && options.required, transform: (actionProperties, value) => entityTransform(value, target, isArray, options)