mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Support fragments in url
support fragments in url when there are no defined explicit servers
This commit is contained in:
@@ -2609,6 +2609,9 @@ module.exports = {
|
||||
// Return no matches for invalid url (if unable to decode parsed url)
|
||||
try {
|
||||
pathToMatch = decodeURI(parsedUrl.pathname);
|
||||
if (!_.isNil(parsedUrl.hash)) {
|
||||
pathToMatch += parsedUrl.hash;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.warn(
|
||||
@@ -4458,11 +4461,7 @@ module.exports = {
|
||||
pathToMatchArr = _.reject(pathToMatch.split('/'), (segment) => {
|
||||
return segment === '';
|
||||
}),
|
||||
pathToMatchSegments = pathToMatchArr.length,
|
||||
fragments = schemaPath.split('#');
|
||||
if (fragments.length > 1) {
|
||||
fragment = '#' + fragments[1];
|
||||
}
|
||||
pathToMatchSegments = pathToMatchArr.length;
|
||||
if (pathToMatchSegments < schemaPathSegments) {
|
||||
return pathToMatch;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user