Commit 37f4ba2
authored
Functionality to make
**Issue**
This PR is related to fix the issue generating after executing PR #462
**Summary**
To disregard fields marked with `set: ignore` for nested fields. This PR also enhances the functionality of `set:ignore` to support the exclusion of fields from `set_sdk`.
**Description**
The PR fixes the issue coming after a new custom field is created and has `set.ignore` set to `true` for it. Even after setting the field to ignore, the field is getting used to set the SDK fields. In this case particularly, the new field was defined as shown below:
```
Code.S3SHA256:
type: string
set:
- method: Create
ignore: true
```
And the issue it is causing is under `sdk.go/newCreateRequestPayload` function, where it is being set, as shown below:
```
if r.ko.Spec.Code.S3SHA256 != nil {
f1.SetS3SHA256(*r.ko.Spec.Code.S3SHA256)
}
```
The goal is to ignore this particular line of code. And also to improve the basic functionality of `set.ignore`.
The `set.ignore` functionality was till now supporting exclusion of fields only when the field was used to set for the resource.
This PR checks the `set.ignore` for field and ignores the following code that creates request payload if it is set to `true`.
**Limitations**
Currently this PR checks the `set.ignore` field only for members of the field whose type is `structure`.
**Acknowledgment**
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.ignore work (#464)1 parent e8df4d5 commit 37f4ba2
File tree
9 files changed
+291
-9
lines changed- pkg
- config
- generate
- ack
- code
- model
- testdata/models/apis/lambda/0000-00-00
9 files changed
+291
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
230 | 262 | | |
231 | 263 | | |
232 | 264 | | |
| |||
486 | 518 | | |
487 | 519 | | |
488 | 520 | | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| |||
928 | 929 | | |
929 | 930 | | |
930 | 931 | | |
| 932 | + | |
931 | 933 | | |
932 | 934 | | |
933 | 935 | | |
| |||
939 | 941 | | |
940 | 942 | | |
941 | 943 | | |
| 944 | + | |
942 | 945 | | |
943 | 946 | | |
944 | 947 | | |
| |||
949 | 952 | | |
950 | 953 | | |
951 | 954 | | |
| 955 | + | |
952 | 956 | | |
953 | 957 | | |
954 | 958 | | |
| |||
959 | 963 | | |
960 | 964 | | |
961 | 965 | | |
| 966 | + | |
962 | 967 | | |
963 | 968 | | |
964 | 969 | | |
| |||
1082 | 1087 | | |
1083 | 1088 | | |
1084 | 1089 | | |
| 1090 | + | |
1085 | 1091 | | |
1086 | 1092 | | |
1087 | 1093 | | |
| |||
1096 | 1102 | | |
1097 | 1103 | | |
1098 | 1104 | | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
1099 | 1128 | | |
1100 | 1129 | | |
1101 | 1130 | | |
| |||
1119 | 1148 | | |
1120 | 1149 | | |
1121 | 1150 | | |
| 1151 | + | |
1122 | 1152 | | |
1123 | 1153 | | |
1124 | 1154 | | |
| |||
1176 | 1206 | | |
1177 | 1207 | | |
1178 | 1208 | | |
| 1209 | + | |
1179 | 1210 | | |
1180 | 1211 | | |
1181 | 1212 | | |
| |||
1209 | 1240 | | |
1210 | 1241 | | |
1211 | 1242 | | |
| 1243 | + | |
1212 | 1244 | | |
1213 | 1245 | | |
1214 | 1246 | | |
| |||
1239 | 1271 | | |
1240 | 1272 | | |
1241 | 1273 | | |
| 1274 | + | |
1242 | 1275 | | |
1243 | 1276 | | |
1244 | 1277 | | |
| |||
1273 | 1306 | | |
1274 | 1307 | | |
1275 | 1308 | | |
| 1309 | + | |
1276 | 1310 | | |
1277 | 1311 | | |
1278 | 1312 | | |
| |||
0 commit comments