Commit a739340
refactor: delete five unused functions from naming-utils
Each was an early-generation helper that a later implementation replaced without
the original being removed:
pathToResourceName -> logic now inlined in openapi-parser.ts
operationIdToMethodName -> determineMethodName in api-generator.ts
operationIdToTypeName -> operationIdToBaseTypeName
extractPathParams -> getFirstPathParamName
getResourceGroup -> groupEndpointsByResource
getResourceGroup is the one worth calling out: it still carried the naive
`endsWith('s') ? slice(0, -1)` singularization that 627f09a fixed in
api-generator.ts, so it was a live trap for anyone who wired it up.
No cascade -- snakeToCamel and snakeToPascal remain in use from api-generator.ts
and type-generator.ts.
Scope: scripts/ only. Confirmed by counting references minus declarations for
every function in non-generated code (13 exported and 18 module-local in
scripts/, 7 local in src/), then closing the gaps that census misses: all 13
exported interfaces in openapi-parser.ts (every one reachable from OpenApiSpec),
arrow-function consts (none exist), and every private/protected method in src/
(all used). These five were the only dead ones.
Nothing removed from src/. Its exports are published API, so an export with no
internal caller is still a consumer's entry point, not dead code -- and the 250+
methods in zoomApi.generated.ts are the library's product. `npm run generate`
produces byte-identical output before and after these deletions, which is the
strongest available evidence that nothing reachable was removed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent af5413d commit a739340
1 file changed
Lines changed: 1 addition & 131 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 5 | | |
20 | 6 | | |
21 | 7 | | |
| |||
31 | 17 | | |
32 | 18 | | |
33 | 19 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 20 | | |
110 | 21 | | |
111 | 22 | | |
| |||
119 | 30 | | |
120 | 31 | | |
121 | 32 | | |
122 | | - | |
| 33 | + | |
123 | 34 | | |
124 | 35 | | |
125 | 36 | | |
| |||
133 | 44 | | |
134 | 45 | | |
135 | 46 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
0 commit comments