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

Function getPySharedEventEnvelopeProperties

scripts/codegen/python.ts:1675–1690  ·  view source on GitHub ↗
(schema: JSONSchema7, ctx: PyCodegenCtx)

Source from the content-addressed store, hash-verified

1673}
1674
1675function getPySharedEventEnvelopeProperties(schema: JSONSchema7, ctx: PyCodegenCtx): PyEventEnvelopeProperty[] {
1676 return getSharedSessionEventEnvelopeProperties(schema, ctx.definitions)
1677 .map((property) => {
1678 const { name, schema, required } = property;
1679 const resolved = resolvePyPropertyType(schema, "SessionEvent", name, required, ctx);
1680
1681 return {
1682 ...property,
1683 jsonName: name,
1684 fieldName: toPyFieldName(name, schema, ctx),
1685 required,
1686 hasDefault: !required || resolved.annotation.includes(" | None"),
1687 resolved,
1688 };
1689 });
1690}
1691
1692function findPyDiscriminator(
1693 variants: JSONSchema7[]

Callers 1

Calls 3

resolvePyPropertyTypeFunction · 0.85
toPyFieldNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…