Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
{
"mode": "auto"
}
],
"conventionalCommits.scopes": [
"pathfinder"
]
}
}
2 changes: 1 addition & 1 deletion packages/pathfinder-web/src/features/web-core/find-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const findSpec: FindSpecFn = (templates, method, url, basePath) => {
// необходимо это для обработки кейсов, когда server в стоплайте указан с путем, например https://path.ru/api
// в таком случае в спеке адреса будут описаны как /adress, а мы будем сравнивать с /api/adress и не сможем их сматчить
const template = value
.replace(/{.*}/gm, match => `(/:${match.replace(/(\{|\})/gm, '')})`)
.replace(/\{[^}]+\}/g, match => `(/:${match.replace(/[{}]/g, '')})`)
.replace(/\/\(\//gm, '(/')

const pattern = new UrlPattern(`${template}(/)(?*)`, {
Expand Down