-
-
Notifications
You must be signed in to change notification settings - Fork 411
fix regex related parsing route name #1284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
a0516dc
to
1513e43
Compare
1513e43
to
cb2ec8b
Compare
Hello @ghg070 |
bugbot run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bugbot free trial expires on September 2, 2025
Learn more in the Cursor dashboard.
@@ -98,7 +98,7 @@ export class SchemaRoutes { | |||
|
|||
// TODO forbid leading symbols [\]^` in a major release (allowed yet for backwards compatibility) | |||
const pathParamMatches = (routeName || "").match( | |||
/({[\w[\\\]^`][-_.\w]*})|(:[\w[\\\]^`][-_.\w]*:?)/g, | |||
/(?<=\/|\.\.\.)({[\w[\\\]^`][-_.\w]*})|(?<=\/|\.\.\.)(:[\w[\\\]^`][-_.\w]*:?)/g, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used swagger-typescript-api to parse and encountered the same issue as this developer (#532). Is it possible to modify the regex in parseRouteName to ensure that there is always a "/" or "..." at the beginning before treating it as a parameter?