Skip to content

Commit b5307d1

Browse files
authored
Merge pull request #495 from koolmonkey/next
Fix regex to match numbers in path parameters
2 parents 79c007d + 70e6427 commit b5307d1

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
@@ -97,7 +97,7 @@ class SchemaRoutes {
9797
const routeName = this.config.hooks.onPreBuildRoutePath(originalRouteName) || originalRouteName;
9898

9999
const pathParamMatches = (routeName || "").match(
100-
/({(([a-zA-Z]-?_?\.?){1,})([0-9]{1,})?})|(:(([a-zA-Z]-?_?\.?){1,})([0-9]{1,})?:?)/g,
100+
/({(([A-z]){1}([a-zA-Z0-9]-?_?\.?){1,})([0-9]{1,})?})|(:(([A-z]){1}([a-zA-Z0-9]-?_?\.?){1,})([0-9]{1,})?:?)/g,
101101
);
102102

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

0 commit comments

Comments
 (0)