Commit a5ca31a
authored
Improve nested fields path and type resolution (#490)
This commit improves the `getAttributeFromPath` function by introducing
a better field path and type resolution mechanism. Now, it considers
aadditional fallback naming conventions, particularly for cases
involving lists.
This is needed to generate type references for `Distribution` resource
in ACK CloudFront controller. More specifically, the CF API Schema for
the `Distribution` resource is naming the `FunctionAssociations` shape
`FunctionAssociationsList`.
Tested with cloudfront-controller using the following config:
```yaml
resources:
Distribution:
fields:
DistributionConfig.DefaultCacheBehavior.FunctionAssociations.Items.FunctionARN:
references:
resource: Function
path: Status.ACKResourceMetadata.ARN
```
Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent 2511e45 commit a5ca31a
1 file changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
585 | 598 | | |
586 | 599 | | |
587 | 600 | | |
| |||
0 commit comments