-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
core
Version
5.x
Current Behavior
When compiling a schema that uses an anyOf/oneOf schema the resolveAllReferences function util won't fully resolve all refs if the same ref is used multiple times in one schema object. For example
{
type: 'object',
anyOf: [{
type: 'object',
properties: {
test1: {
$ref: '#/definitions/testref'
},
test2: {
$ref: '#/definitions/testref'
}
}
}],
definitions: {
testref: {
type: 'string'
}
}
}
resolveAllReferences
will resolve the first ref but then because it has already resolved the first it will ignore the second leading to errors in compiled schema.
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- OS:
- Node:
- npm:
Anything else?
No response