From 2a45f7f216eb122b571ccd00c4216b02a4a24e20 Mon Sep 17 00:00:00 2001 From: Alex Bramhill Date: Wed, 12 Jul 2023 10:34:28 +0100 Subject: [PATCH] fix(APIM-531): fix swagger regex field --- src/helpers/regex.helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/regex.helper.ts b/src/helpers/regex.helper.ts index b96b9afb..52513520 100644 --- a/src/helpers/regex.helper.ts +++ b/src/helpers/regex.helper.ts @@ -1,4 +1,4 @@ // This helper function is used to convert the regex pattern to a string so that it can be used in the swagger documentation. export const regexToString = (regex: RegExp): string => { - return regex.toString().replace(/^\/|\/$/g, ''); + return regex.source; };