Skip to content

Commit

Permalink
fix(APIM-531): fix swagger regex field
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Bramhill committed Jul 12, 2023
1 parent 2bf093a commit 2a45f7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/regex.helper.ts
Original file line number Diff line number Diff line change
@@ -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;
};

0 comments on commit 2a45f7f

Please sign in to comment.