(s: string)
| 1436 | let rpcDefinitions: DefinitionCollections = { definitions: {}, $defs: {} }; |
| 1437 | |
| 1438 | function singularPascal(s: string): string { |
| 1439 | const p = toPascalCase(s); |
| 1440 | if (p.endsWith("ies")) return `${p.slice(0, -3)}y`; |
| 1441 | if (/(xes|zes|ches|shes|sses)$/i.test(p)) return p.slice(0, -2); |
| 1442 | if (p.endsWith("s") && !/(ss|us|is)$/i.test(p)) return p.slice(0, -1); |
| 1443 | return p; |
| 1444 | } |
| 1445 | |
| 1446 | function getMethodResultSchema(method: RpcMethod): JSONSchema7 | undefined { |
| 1447 | return resolveSchema(method.result, rpcDefinitions) ?? method.result ?? undefined; |
no test coverage detected
searching dependent graphs…