Skip to content

Commit 76028c0

Browse files
Hexi1997Manweill
authored andcommitted
feat: support url fuzzy match
1 parent f30923f commit 76028c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export async function codegen(params: ISwaggerOptions) {
9797
if (options.urlFilters?.length > 0) {
9898
paths = {}
9999
Object.keys(swaggerSource.paths).forEach(path => {
100-
if (options.urlFilters.some(urlFilter => urlFilter.indexOf(path) > -1)) {
100+
if (options.urlFilters.some(urlFilter => path.includes(urlFilter))) {
101101
paths[path] = swaggerSource.paths[path]
102102
}
103103
})

0 commit comments

Comments
 (0)