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

Interface ResolvedRefBasedUnion

scripts/codegen/python.ts:293–297  ·  view source on GitHub ↗

* Replace flat-merged dataclasses emitted by quicktype for $ref-based * discriminated unions with proper Python unions: a `Name = VariantA | ...` * alias plus a `_load_Name(obj)` dispatcher. Rewrites `Name.from_dict(x)` and * `to_class(Name, x)` references to use the dispatcher / per-variant * `

Source from the content-addressed store, hash-verified

291 * there also route through the new dispatcher.
292 */
293interface ResolvedRefBasedUnion {
294 aliasName: string;
295 discriminatorProp: string;
296 dispatch: Array<{ value: string; typeName: string }>;
297}
298function postProcessRefBasedDiscriminatedUnionsForPython(
299 code: string,
300 definitions: Record<string, JSONSchema7>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…