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

Function wrapperParamsClassName

java/scripts/codegen/java.ts:1657–1665  ·  view source on GitHub ↗

* Return the params class name if the method has a params schema with properties * other than sessionId (i.e. there are user-supplied parameters).

(method: RpcMethodNode)

Source from the content-addressed store, hash-verified

1655 * other than sessionId (i.e. there are user-supplied parameters).
1656 */
1657function wrapperParamsClassName(method: RpcMethodNode): string | null {
1658 let params = method.params;
1659 if (params?.$ref) params = resolveRef(params) as JSONSchema7;
1660 if (!params || typeof params !== "object") return null;
1661 const props = params.properties ?? {};
1662 const userProps = Object.keys(props).filter((k) => k !== "sessionId");
1663 if (userProps.length === 0) return null;
1664 return rpcMethodToClassName(method.rpcMethod) + "Params";
1665}
1666
1667/** True if the method's params schema contains a "sessionId" property */
1668function methodHasSessionId(method: RpcMethodNode): boolean {

Callers 3

generateApiMethodFunction · 0.85
generateNamespaceApiFileFunction · 0.85
generateRpcRootFileFunction · 0.85

Calls 2

rpcMethodToClassNameFunction · 0.85
resolveRefFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…