Commit 2d95a1f
authored
Use loadModelWithLatestAPIVersion to load models for crossplane (#237)
This fixes an issue where the crossplane command would fail to find API
models for resources whose name differed between the model and API in
the SDK. Previous behavior was to continue using the svcAlias instead of
correctly using model_name from the configuration.
The changes here also have the added benefit of making the generateCrossplane function code more similar to other generation functions and utilize more of the common codebase.
Issue #, if available:
N/A
Description of changes:
Replace duplicated code in the generateCrossplane function with implementations in common.go and change variables to match the naming scheme used elsewhere.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent 31204bc commit 2d95a1f
File tree
3 files changed
+9
-44
lines changed- cmd/ack-generate/command
- templates/crossplane
3 files changed
+9
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | | - | |
30 | 27 | | |
31 | | - | |
32 | | - | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
| |||
39 | 34 | | |
40 | 35 | | |
41 | 36 | | |
42 | | - | |
43 | | - | |
44 | 37 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 38 | | |
49 | 39 | | |
50 | 40 | | |
| |||
58 | 48 | | |
59 | 49 | | |
60 | 50 | | |
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 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
89 | 54 | | |
90 | 55 | | |
91 | 56 | | |
| |||
106 | 71 | | |
107 | 72 | | |
108 | 73 | | |
109 | | - | |
| 74 | + | |
110 | 75 | | |
111 | 76 | | |
112 | 77 | | |
| |||
115 | 80 | | |
116 | 81 | | |
117 | 82 | | |
118 | | - | |
119 | | - | |
| 83 | + | |
| 84 | + | |
120 | 85 | | |
121 | 86 | | |
122 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
0 commit comments