File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -103,16 +103,7 @@ function normalizedUrl(oas) {
103103}
104104
105105function normalizePath ( path ) {
106- const curlBacketMatch = / { ( .* ?) } / ;
107-
108- return path
109- . split ( '/' )
110- . map ( p => {
111- const pathMatch = curlBacketMatch . exec ( p ) ;
112- if ( pathMatch ) return `:${ pathMatch [ 1 ] } ` ;
113- return p ;
114- } )
115- . join ( '/' ) ;
106+ return path . replace ( / { ( .* ?) } / g, ':$1' ) ;
116107}
117108
118109function generatePathMatches ( paths , pathName , origin ) {
@@ -204,8 +195,7 @@ class Oas {
204195 return new Operation ( this , path , method , operation ) ;
205196 }
206197
207- findOperation ( logInput ) {
208- const { url, method } = logInput . request . log . entries [ 0 ] . request ;
198+ findOperation ( url , method ) {
209199 const { origin, pathname } = new URL ( url ) ;
210200 const { servers, paths } = this ;
211201
You can’t perform that action at this time.
0 commit comments