-
Notifications
You must be signed in to change notification settings - Fork 227
Fixing issue #309 - References outside components and paths are not resolved #645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
erfemega
wants to merge
11
commits into
develop
Choose a base branch
from
fix/issue#309
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8619eff
Fixing issue #309
erfemega b244969
Dereferencing elements from out of components/schemas before processi…
erfemega 3e81c24
Merge branch 'develop' into fix/issue#309
erfemega e6b108d
adding method descriptions
erfemega 663ab9d
Adding fix to issue 309 and related scenarios
erfemega a0c249f
Removing duplicated methods
erfemega 5dfdd84
Adding comments related to dereference
erfemega d327f77
Merge branch 'develop' into fix/issue#309
erfemega 02d37eb
Merge branch 'develop' into fix/issue#309
erfemega d3e5bdb
Merge branch 'develop' into fix/issue#309
erfemega bf34867
Merge branch 'develop' into fix/issue#309
erfemega File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,5 +142,26 @@ module.exports = { | |
res.push(segment); | ||
} | ||
return res.join('/'); | ||
}, | ||
|
||
/** | ||
* Generate a regexp to match with strings that does not contain the provided string | ||
* @param {string} negatedWord The string we want to appear in the string | ||
* @returns {object} The regexp that matches with strings that does not contain the provided string | ||
*/ | ||
getNegativeRegexp: function (negatedWord) { | ||
const regexpValue = `^(?!.*?${negatedWord}).*$`, | ||
regexp = new RegExp(regexpValue); | ||
return regexp; | ||
}, | ||
|
||
/** | ||
* Verifies if a node has same content as one of the parents in traverseUtil context so it is a circular ref | ||
* @param {function} traverseContext - The context of the traverse function | ||
* @param {object} contentFromTrace - The resolved content of the node to deref | ||
* @returns {boolean} whether is circular reference or not. | ||
*/ | ||
isCircularReference: function (traverseContext, contentFromTrace) { | ||
return traverseContext.parents.find((parent) => { return parent.node === contentFromTrace; }) !== undefined; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @erfemega Is this a deep comparison? |
||
} | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.