Commit 5b4fb1a
authored
Fix chart_schema.yaml import-values rule (#725)
The existing rule for validating dependency import-values worked well for either of these two cases:
**1. Importing exports**
```yaml
dependencies:
- name: dep1
version: 0.14.1
repository: oci://myrepo
import-values:
- data
```
**2. Importing child values into the parent**
```yaml
dependencies:
- name: dep1
version: 0.14.1
repository: oci://myrepo
import-values:
- child: default.data
parent: myimports
```
However, it failed on the following valid usecase:
```yaml
dependencies:
- name: dep1
version: 0.14.1
repository: oci://myrepo
import-values:
- data
- child: default.data
parent: myimports
```
Giving the following error:
```
dependencies.0.import-values.1: '{'parent': 'myimports', 'child': 'default.data'}' is not a str.
dependencies.0.import-values.0 : 'data' is not a map
```
This is because the Yamale is validating on a list of strings *or* a list of `import-value`, where a list containing both is also valid.
This commit changes the rule to allow both methods to be in the `import-values` list.
Signed-off-by: Ben Lavery-Griffiths <ben@lavery-griffiths.com>1 parent 5bde7c5 commit 5b4fb1a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments