Commit c255467
committed
INF-1307 drop generated typed clients; clears all GRC warnings
The CLI is fully spec-driven - cmd/twoctl/cli/operations.go walks the
embedded OpenAPI spec at startup and registers a cobra command per
operation. Nothing outside zz_generated.go ever imported the typed
clients, so they were 22k lines of dead code that only existed to feed
goreportcard misspellings (oustanding, occured in upstream specs),
gocyclo violations (CountryCodeEnum.Valid at complexity 145, generated
union Marshal/Unmarshal, etc.), and golint nits we could not fix without
forking oapi-codegen.
Removed:
- internal/clients/<api>/zz_generated.go (~22k lines)
- oapi-codegen tool dependency
- oapi-codegen.yaml configs
Kept:
- openapi/<api>-api.yaml (vendored upstream)
- internal/preprocess (3.1 -> 3.0 rewriter)
- cmd/twoctl/cli/specs/*.processed.yaml (embedded for runtime)
scripts/codegen.sh now only runs the preprocess step and copies the
processed specs into the embed dir.
Local lint sweep across the whole repo (gofmt -s, go vet, ineffassign,
misspell, gocyclo over 15, golint) produces zero output.1 parent 4e1f0dd commit c255467
16 files changed
Lines changed: 20 additions & 22784 deletions
File tree
- docs
- internal/clients
- billing-account
- checkout
- company
- limits
- recourse
- repay
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | | - | |
| 6 | + | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | 16 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 17 | + | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
25 | | - | |
26 | 21 | | |
27 | 22 | | |
| 23 | + | |
28 | 24 | | |
29 | | - | |
30 | 25 | | |
31 | | - | |
32 | 26 | | |
33 | 27 | | |
34 | 28 | | |
| 29 | + | |
| 30 | + | |
35 | 31 | | |
36 | | - | |
37 | | - | |
38 | 32 | | |
39 | | - | |
| 33 | + | |
40 | 34 | | |
41 | | - | |
42 | 35 | | |
43 | | - | |
44 | | - | |
45 | 36 | | |
46 | 37 | | |
47 | | - | |
| 38 | + | |
48 | 39 | | |
Large diffs are not rendered by default.
This file was deleted.
0 commit comments