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

Function getVariantSchema

scripts/codegen/csharp.ts:930–938  ·  view source on GitHub ↗
(variant: JSONSchema7, definitions: DefinitionCollections)

Source from the content-addressed store, hash-verified

928}
929
930function getVariantSchema(variant: JSONSchema7, definitions: DefinitionCollections): JSONSchema7 | undefined {
931 if (variant.$ref) {
932 const resolved = resolveRef(variant.$ref, definitions);
933 return typeof resolved === "object" && resolved !== null ? resolved : undefined;
934 }
935
936 const resolved = resolveObjectSchema(variant, definitions) ?? resolveSchema(variant, definitions) ?? variant;
937 return typeof resolved === "object" && resolved !== null ? resolved : undefined;
938}
939
940function getJsonUnionMatchExpression(variant: JsonUnionVariant, variants: JsonUnionVariant[]): string | undefined {
941 const required = new Set(variant.schema?.required ?? []);

Callers 1

Calls 3

resolveObjectSchemaFunction · 0.85
resolveSchemaFunction · 0.85
resolveRefFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…