perspective-dev/perspective · error
docs corpus: missing, skipping schema
Error message
docs corpus: ${path} missing, skipping ${type} schema What it means
Warning in the docs-corpus build script: one of the tool schema source files listed in TOOL_SCHEMA_TYPES does not exist on disk, so the JSON schema for that tool type is skipped and omitted from the generated corpus. It signals an incomplete docs build, not a runtime failure.
Solutions
- Build the missing source (usually generated .d.ts or .ts artifacts) before running the docs corpus step
- Check the path in TOOL_SCHEMA_TYPES against the actual build output directory
- Verify a prior build step wasn't skipped or failed silently
- Regenerate artifacts with a clean build if paths changed in a refactor
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at rust/perspective-viewer/tools.mjs:286 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of perspective-dev/perspective@11c8238c0c (2026-09-09).
Data as JSON: /api/errors/4dd4a2557ceda64d.
Report an issue: GitHub.
Appendix: source
Thrown at rust/perspective-viewer/tools.mjs:286
return Object.fromEntries(
Object.entries(node).map(([k, v]) => [k, walk(v)]),
);
};
const out = walk(schema);
for (const name of mangled.keys()) {
delete out.definitions[name];
}
return out;
}
async function buildToolSchemas() {
const { createGenerator } = await import("ts-json-schema-generator");
const schemas = {};
for (const [type, path] of TOOL_SCHEMA_TYPES) {
if (!fs.existsSync(path)) {
console.warn(
`docs corpus: ${path} missing, skipping ${type} schema`,
);
continue;
}
schemas[type] = inlineMangledDefinitions(
createGenerator({
path,
type,
skipTypeCheck: true,
topRef: true,
}).createSchema(type),
);
}
return schemas;
}
View on GitHub (pinned to 11c8238c0c)