Skip to content

Commit

Permalink
check item arrays for circular references also
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmd-azeez committed Sep 3, 2024
1 parent 549594e commit 3e47caa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/normalizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,11 @@ function detectCircularReference(schema: Schema, visited: Set<string> = new Set(
if (error) {
return error;
}
} else if (property.items?.$ref) {
const error = detectCircularReference(property.items.$ref, new Set(visited));
if (error) {
return error;
}
}
}

Expand Down

0 comments on commit 3e47caa

Please sign in to comment.