fix: Support slash-based branch names and add test coverage (#1940)#2131
fix: Support slash-based branch names and add test coverage (#1940)#2131BossChaos wants to merge 2 commits intoasyncapi:masterfrom
Conversation
…1940) Bug fixes: 1. GitHub URL parsing: Changed regex from ([^/]+) to (.+?) for branch names - Now supports slash-based branches like 'feature/new-validation' - File: src/domains/services/validation.service.ts 2. File extension detection: Use path.extname() instead of split('.') - Correctly handles multi-dot filenames like 'my.asyncapi.yaml' - File: src/domains/models/SpecificationFile.ts Fixes asyncapi#1940
|
|
We require all PRs to follow Conventional Commits specification. |
There was a problem hiding this comment.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
|




Description
This PR fixes issue #1940 by improving GitHub URL parsing to support slash-based branch names (e.g.,
feature/new-validation).Changes
Bug Fix (commit 881ecda)
([^/]+)to(.+?)for branch name extractionpath.extname()instead ofsplit('.')for multi-dot filenamesTest Coverage (commit e68e935)
validation.service.test.tshttps://github.com/owner/repo/blob/feature/new-validation/file.yamlare correctly parsedTesting
Related Issue
Fixes #1940