MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / schemaLabel

Function schemaLabel

src/tools/api/openapi-digest.ts:34–39  ·  view source on GitHub ↗
(schema: any)

Source from the content-addressed store, hash-verified

32}
33
34function schemaLabel(schema: any): string {
35 if (!schema) return 'any';
36 if (schema.$ref) return refName(schema.$ref) ?? 'object';
37 if (schema.type === 'array') return `${schemaLabel(schema.items)}[]`;
38 return schema.type ?? (schema.properties ? 'object' : 'any');
39}
40
41export class OpenApiDigestTool extends Tool<z.infer<typeof Args>> {
42 name = 'openapi_digest';

Callers 1

executeMethod · 0.85

Calls 1

refNameFunction · 0.85

Tested by

no test coverage detected