Skip to content

Commit 7a8f234

Browse files
committed
refactor: improve regex for route param parsing
accourding to this suggestion #686 (comment)
1 parent 55aee45 commit 7a8f234

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/schema-routes/schema-routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class SchemaRoutes {
110110
originalRouteName;
111111

112112
const pathParamMatches = (routeName || "").match(
113-
/({[a-zA-Z]([a-zA-Z0-9-_.])*})|(:[a-zA-Z]([-_.]?[a-zA-Z0-9-_.])*:?)/g,
113+
/({[a-zA-Z]([-_.]*[a-zA-Z0-9])*})|(:[a-zA-Z]([-_.]*[a-zA-Z0-9])*:?)/g,
114114
);
115115

116116
// used in case when path parameters is not declared in requestInfo.parameters ("in": "path")

0 commit comments

Comments
 (0)