Removed usage of schema resolution cache to avoid incorrect resolution

This commit is contained in:
Vishal Shingala
2022-02-17 12:11:37 +05:30
parent 3e1e904448
commit d6ad9133d4
3 changed files with 21 additions and 161 deletions

View File

@@ -2062,6 +2062,10 @@ module.exports = {
options = _.merge({}, defaultOptions, options);
var refObj, savedSchema;
if (typeof $ref !== 'string') {
return { value: `Invalid $ref: ${$ref} was found` };
}
savedSchema = $ref.split('/').slice(1).map((elem) => {
// https://swagger.io/docs/specification/using-ref#escape
// since / is the default delimiter, slashes are escaped with ~1