Skip to content

Commit

Permalink
fix: map also contains arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
dadav committed Aug 19, 2023
1 parent cca9847 commit c828ab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/helm-schema/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func worker(

if !skipDeps {
for _, dep := range chart.Dependencies {
if depName, ok := dep["name"]; ok {
if depName, ok := dep["name"].(string); ok {
schema["properties"].(map[string]interface{})[depName] = map[string]string{
"title": chart.Name,
"description": chart.Description,
Expand Down
6 changes: 3 additions & 3 deletions pkg/chart/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
)

type ChartFile struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Dependencies []map[string]string `yaml:"dependencies"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Dependencies []map[string]interface{} `yaml:"dependencies"`
}

// ReadChart parses the given yaml into a ChartFile struct
Expand Down

0 comments on commit c828ab7

Please sign in to comment.