Skip to content

Commit

Permalink
refactor: improve regex for route param parsing
Browse files Browse the repository at this point in the history
accourding to this suggestion  acacode#686 (comment)
  • Loading branch information
ahoseinian committed May 10, 2024
1 parent fd18c23 commit 9be7ea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/schema-routes/schema-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class SchemaRoutes {
originalRouteName;

const pathParamMatches = (routeName || '').match(
/({[a-zA-Z]([a-zA-Z0-9-_.])*})|(:[a-zA-Z]([-_.]?[a-zA-Z0-9-_.])*:?)/g,
/({[a-zA-Z]([-_.]*[a-zA-Z0-9])*})|(:[a-zA-Z]([-_.]*[a-zA-Z0-9])*:?)/g,
);

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

0 comments on commit 9be7ea8

Please sign in to comment.