diff --git a/internal/blueprint/blueprint.go b/internal/blueprint/blueprint.go index 2b3b39054..a8e345182 100644 --- a/internal/blueprint/blueprint.go +++ b/internal/blueprint/blueprint.go @@ -3,15 +3,12 @@ package blueprint // A Blueprint is a high-level description of an image. type Blueprint struct { - Name string `json:"name" toml:"name"` - Description string `json:"description" toml:"description"` - Version string `json:"version,omitempty" toml:"version,omitempty"` - Packages []Package `json:"packages" toml:"packages"` - - // skip "omitempty" for json, because cockpit-composer chokes when the keys are missing - Modules []Package `json:"modules" toml:"modules,omitempty"` - Groups []Group `json:"groups" toml:"groups,omitempty"` - + Name string `json:"name" toml:"name"` + Description string `json:"description" toml:"description"` + Version string `json:"version,omitempty" toml:"version,omitempty"` + Packages []Package `json:"packages" toml:"packages"` + Modules []Package `json:"modules" toml:"modules"` + Groups []Group `json:"groups" toml:"groups"` Customizations *Customizations `json:"customizations,omitempty" toml:"customizations,omitempty"` } diff --git a/internal/weldr/api_test.go b/internal/weldr/api_test.go index 7ea01aab3..d7dec5b65 100644 --- a/internal/weldr/api_test.go +++ b/internal/weldr/api_test.go @@ -170,6 +170,8 @@ func TestBlueprintsInfoToml(t *testing.T) { Packages: []blueprint.Package{ {"httpd", "2.4.*"}, }, + Groups: []blueprint.Group{}, + Modules: []blueprint.Package{}, } if diff := cmp.Diff(got, expected); diff != "" { t.Fatalf("received unexpected blueprint: %s", diff)