Commit b6fff64
fix(motoko): useIcp also uses ic:aaaaa-aa imported interface
Introduce a computed `useImportedInterface` flag (true when useDfx OR
useIcp) so that both toolchain paths import all types from ic:aaaaa-aa
instead of re-declaring them inline.
icp-cli's @dfinity/motoko recipe uses the full management canister
interface (including PUT/DELETE). dfx lags behind — but that is dfx's
issue, not something the generator template should paper over.
The inline fallback (neither flag set) keeps the hand-written interface
with full PUT/DELETE support.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 07d33fe commit b6fff64
2 files changed
Lines changed: 9 additions & 17 deletions
File tree
- modules/openapi-generator/src/main
- java/org/openapitools/codegen/languages
- resources/motoko
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
| |||
Lines changed: 7 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 27 | + | |
38 | 28 | | |
39 | 29 | | |
40 | | - | |
41 | | - | |
| 30 | + | |
| 31 | + | |
42 | 32 | | |
43 | | - | |
| 33 | + | |
44 | 34 | | |
45 | 35 | | |
46 | 36 | | |
| |||
75 | 65 | | |
76 | 66 | | |
77 | 67 | | |
78 | | - | |
| 68 | + | |
79 | 69 | | |
80 | 70 | | |
81 | 71 | | |
| |||
0 commit comments