Commit ce5dc75
authored
Field Config Fixes for Code Generator (#295)
- Support for nested list of secrets
- Code was getting generated for single SecretRef
Generated code with the fix
```
authenticationMode:
description: Denotes the user's authentication properties, such as
whether it requires a password to authenticate.
properties:
passwords:
items:
description: SecretKeyReference combines a k8s corev1.SecretReference
with a specific key within the referred-to Secret
properties:
key:
description: Key is the key within the secret
type: string
name:
description: Name is unique within a namespace to reference
a secret resource.
type: string
namespace:
description: Namespace defines the space within which the
secret name must be unique.
type: string
required:
- key
type: object
type: array
type_:
type: string
type: object
```
- Fix the struct compare logic
- Spec was appended to field path due to this compare
config was ignored.
https://github.com/aws-controllers-k8s/code-generator/blob/main/pkg/generate/code/compare.go#L128
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent 386dc0d commit ce5dc75
File tree
7 files changed
+3511
-3
lines changed- pkg
- generate/code
- model
- testdata/models/apis/memorydb/0000-00-00
7 files changed
+3511
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
566 | 568 | | |
567 | 569 | | |
568 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
263 | 264 | | |
264 | | - | |
| 265 | + | |
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
| 544 | + | |
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments