MCPcopy Index your code
hub / github.com/github/copilot-sdk / visitSchema

Function visitSchema

scripts/codegen/utils.ts:1302–1315  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1300 };
1301
1302 const visitSchema = (value: unknown): void => {
1303 if (!value || typeof value !== "object") return;
1304 if (Array.isArray(value)) {
1305 for (const item of value) visitSchema(item);
1306 return;
1307 }
1308
1309 const record = value as Record<string, unknown>;
1310 if (typeof record.$ref === "string") {
1311 const localRef = parseLocalDefinitionRef(record.$ref);
1312 if (localRef) visitDefinition(localRef);
1313 }
1314 for (const child of Object.values(record)) visitSchema(child);
1315 };
1316
1317 for (const rootName of rootDefinitionNames) {
1318 visitDefinition(rootName);

Callers 2

visitDefinitionFunction · 0.85

Calls 2

parseLocalDefinitionRefFunction · 0.85
visitDefinitionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…