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) {
103
103
}
104
104
105
105
function 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' ) ;
116
107
}
117
108
118
109
function generatePathMatches ( paths , pathName , origin ) {
@@ -204,8 +195,7 @@ class Oas {
204
195
return new Operation ( this , path , method , operation ) ;
205
196
}
206
197
207
- findOperation ( logInput ) {
208
- const { url, method } = logInput . request . log . entries [ 0 ] . request ;
198
+ findOperation ( url , method ) {
209
199
const { origin, pathname } = new URL ( url ) ;
210
200
const { servers, paths } = this ;
211
201
You can’t perform that action at this time.
0 commit comments