(method: RpcMethod, schemaOverride?: JSONSchema7)
| 1374 | } |
| 1375 | |
| 1376 | function pythonResultTypeName(method: RpcMethod, schemaOverride?: JSONSchema7): string { |
| 1377 | const schema = schemaOverride ?? getMethodResultSchema(method); |
| 1378 | // If schema is a $ref, derive the type name from the ref path |
| 1379 | if (schema?.$ref) { |
| 1380 | const refName = schema.$ref.split("/").pop(); |
| 1381 | if (refName) return toPascalCase(refName); |
| 1382 | } |
| 1383 | return getRpcSchemaTypeName(schema, toPascalCase(method.rpcMethod) + "Result"); |
| 1384 | } |
| 1385 | |
| 1386 | /** Detect the Zod optional params pattern: `anyOf: [{ not: {} }, { $ref }]` */ |
| 1387 | function isParamsOptional(method: RpcMethod): boolean { |
no test coverage detected
searching dependent graphs…