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

Function goObjectSchemaForMatch

scripts/codegen/go.ts:1237–1244  ·  view source on GitHub ↗
(schema: JSONSchema7, ctx: GoCodegenCtx)

Source from the content-addressed store, hash-verified

1235}
1236
1237function goObjectSchemaForMatch(schema: JSONSchema7, ctx: GoCodegenCtx): JSONSchema7 | undefined {
1238 const resolved = resolveSchema(schema, ctx.definitions) ?? schema;
1239 const objectSchema = resolveObjectSchema(resolved, ctx.definitions) ?? resolved;
1240 if (objectSchema?.properties || objectSchema?.type === "object" || objectSchema?.additionalProperties === false) {
1241 return objectSchema;
1242 }
1243 return undefined;
1244}
1245
1246function goSchemaNeedsJSONMatch(schema: JSONSchema7, ctx: GoCodegenCtx): boolean {
1247 if (goObjectSchemaForMatch(schema, ctx)) return true;

Callers 3

goSchemaNeedsJSONMatchFunction · 0.85

Calls 2

resolveSchemaFunction · 0.85
resolveObjectSchemaFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…