MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / collectRefs

Function collectRefs

tests/schema-validation.test.cjs:176–185  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

174 const registryRefs = new Set();
175
176 function collectRefs(obj) {
177 if (typeof obj === 'object' && obj !== null) {
178 if (obj.$ref) {
179 registryRefs.add(obj.$ref);
180 }
181 for (const value of Object.values(obj)) {
182 collectRefs(value);
183 }
184 }
185 }
186
187 collectRefs(registry);
188

Callers 1

Calls 1

addMethod · 0.80

Tested by

no test coverage detected