Commit 82daa90
authored
codegen: fix client init for interceptor-only services (#3906)
* codegen: make union collection traversal deterministic
Sort object attributes before collecting union types in service and HTTP codegen so NameScope-assigned union identifiers do not oscillate across runs. Add regression tests that assert union naming remains stable when object field declaration order is reversed.
* codegen: fix client init for no-method services
When a service has a client interceptor but no methods, client codegen emitted an
unnamed goa.Endpoint parameter. Generate a zero-endpoint NewClient signature and
add a regression test.1 parent 68c77a7 commit 82daa90
4 files changed
Lines changed: 20 additions & 1 deletion
File tree
- codegen/service
- templates
- testdata
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1044 | 1051 | | |
1045 | 1052 | | |
1046 | 1053 | | |
| |||
0 commit comments