We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c2a4a7 commit c55c19fCopy full SHA for c55c19f
index.js
@@ -564,9 +564,14 @@ function buildArray (context, location) {
564
565
if (Array.isArray(itemsSchema)) {
566
for (let i = 0; i < itemsSchema.length; i++) {
567
- const item = itemsSchema[i]
+ let item = itemsSchema[i]
568
+ let itemLocation = itemsLocation.getPropertyLocation(i)
569
+ if (item.$ref) {
570
+ itemLocation = resolveRef(context, itemLocation)
571
+ item = itemLocation.schema
572
+ }
573
functionCode += `value = obj[${i}]`
- const tmpRes = buildValue(context, itemsLocation.getPropertyLocation(i), 'value')
574
+ const tmpRes = buildValue(context, itemLocation, 'value')
575
functionCode += `
576
if (${i} < arrayLength) {
577
if (${buildArrayTypeCondition(item.type, `[${i}]`)}) {
0 commit comments