diff --git a/apis/management.cattle.io/v3/catalog_types.go b/apis/management.cattle.io/v3/catalog_types.go index 4a22cd9b..4085ed9f 100644 --- a/apis/management.cattle.io/v3/catalog_types.go +++ b/apis/management.cattle.io/v3/catalog_types.go @@ -236,3 +236,7 @@ type ClusterCatalog struct { Catalog `json:",inline" mapstructure:",squash"` ClusterName string `json:"clusterName,omitempty" norman:"required,type=reference[cluster]"` } + +type CatalogRefresh struct { + Catalogs []string `json:"catalogs"` +} diff --git a/apis/management.cattle.io/v3/schema/schema.go b/apis/management.cattle.io/v3/schema/schema.go index a4da5dae..062c70eb 100644 --- a/apis/management.cattle.io/v3/schema/schema.go +++ b/apis/management.cattle.io/v3/schema/schema.go @@ -111,12 +111,13 @@ func catalogTypes(schemas *types.Schemas) *types.Schemas { &m.Embed{Field: "status"}, &m.Drop{Field: "helmVersionCommits"}, ). + MustImport(&Version, v3.CatalogRefresh{}). MustImportAndCustomize(&Version, v3.Catalog{}, func(schema *types.Schema) { schema.ResourceActions = map[string]types.Action{ - "refresh": {}, + "refresh": {Output: "catalogRefresh"}, } schema.CollectionActions = map[string]types.Action{ - "refresh": {}, + "refresh": {Output: "catalogRefresh"}, } }). AddMapperForType(&Version, v3.Template{}, @@ -732,10 +733,10 @@ func projectCatalogTypes(schemas *types.Schemas) *types.Schemas { &mapper.NamespaceIDMapper{}). MustImportAndCustomize(&Version, v3.ProjectCatalog{}, func(schema *types.Schema) { schema.ResourceActions = map[string]types.Action{ - "refresh": {}, + "refresh": {Output: "catalogRefresh"}, } schema.CollectionActions = map[string]types.Action{ - "refresh": {}, + "refresh": {Output: "catalogRefresh"}, } }) } @@ -749,10 +750,10 @@ func clusterCatalogTypes(schemas *types.Schemas) *types.Schemas { &mapper.NamespaceIDMapper{}). MustImportAndCustomize(&Version, v3.ClusterCatalog{}, func(schema *types.Schema) { schema.ResourceActions = map[string]types.Action{ - "refresh": {}, + "refresh": {Output: "catalogRefresh"}, } schema.CollectionActions = map[string]types.Action{ - "refresh": {}, + "refresh": {Output: "catalogRefresh"}, } }) }