Skip to content

Commit

Permalink
feat: support url fuzzy match
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexi1997 authored and Manweill committed Apr 19, 2024
1 parent f30923f commit 76028c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export async function codegen(params: ISwaggerOptions) {
if (options.urlFilters?.length > 0) {
paths = {}
Object.keys(swaggerSource.paths).forEach(path => {
if (options.urlFilters.some(urlFilter => urlFilter.indexOf(path) > -1)) {
if (options.urlFilters.some(urlFilter => path.includes(urlFilter))) {
paths[path] = swaggerSource.paths[path]
}
})
Expand Down

0 comments on commit 76028c0

Please sign in to comment.