(dir)
| 76 | } |
| 77 | |
| 78 | function findAllSchemas(dir) { |
| 79 | const schemas = []; |
| 80 | |
| 81 | function traverse(currentDir) { |
| 82 | const items = fs.readdirSync(currentDir); |
| 83 | |
| 84 | for (const item of items) { |
| 85 | const itemPath = path.join(currentDir, item); |
| 86 | const stat = fs.statSync(itemPath); |
| 87 | |
| 88 | if (stat.isDirectory()) { |
| 89 | traverse(itemPath); |
| 90 | } else if (item.endsWith('.json')) { |
| 91 | schemas.push(itemPath); |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | traverse(dir); |
| 97 | return schemas; |
| 98 | } |
| 99 | |
| 100 | function validateSchemaStructure(schemaPath, schema) { |
| 101 | // Check required top-level fields |
no test coverage detected