From de147e90e38f729bfe805451b6a7064167da1613 Mon Sep 17 00:00:00 2001 From: Paola Nicosia Date: Mon, 15 Sep 2025 17:58:52 +0200 Subject: [PATCH] fix: typo in get and delete itd commands --- docs/30_commands.md | 6 +++--- internal/cmd/item-type-definition/delete.go | 4 ++-- internal/cmd/item-type-definition/get.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/30_commands.md b/docs/30_commands.md index f313f7de..ad777690 100644 --- a/docs/30_commands.md +++ b/docs/30_commands.md @@ -1370,10 +1370,10 @@ Get a Catalog item Get an Item Type Definition -You need to specify the name and its tenant namespace, via the respective flags. The company-id flag can be omitted if it is already set in the context. +You need to specify the name via the respective flag. The company-id flag can be omitted if it is already set in the context and it is used as tenantId of the item type definition. ```bash -miactl itd get --tenantId tenantId --name name +miactl itd get --name name ``` ### delete @@ -1387,7 +1387,7 @@ Delete an Item Type Definition You need to specify the companyId and the item type definition name via the respective flags (recommended). The company-id flag can be omitted if it is already set in the context. ```bash -miactl itd delete --name name --version version ... +miactl itd delete --name name ``` ### put diff --git a/internal/cmd/item-type-definition/delete.go b/internal/cmd/item-type-definition/delete.go index 96cbc4d2..2b9e20d6 100644 --- a/internal/cmd/item-type-definition/delete.go +++ b/internal/cmd/item-type-definition/delete.go @@ -40,7 +40,7 @@ const ( You need to specify the companyId and the item type definition name via the respective flags (recommended). The company-id flag can be omitted if it is already set in the context. ` - deleteCmdUse = "delete --name name --version version" + deleteCmdUse = "delete --name name" ) func DeleteCmd(options *clioptions.CLIOptions) *cobra.Command { @@ -68,7 +68,7 @@ func DeleteCmd(options *clioptions.CLIOptions) *cobra.Command { return itd.ErrMissingCompanyID } - if options.MarketplaceItemVersion != "" && options.MarketplaceItemID != "" { + if options.ItemTypeDefinitionName != "" { err = deleteITD( cmd.Context(), client, diff --git a/internal/cmd/item-type-definition/get.go b/internal/cmd/item-type-definition/get.go index ecc056e0..f4423a90 100644 --- a/internal/cmd/item-type-definition/get.go +++ b/internal/cmd/item-type-definition/get.go @@ -32,9 +32,9 @@ const ( This command get an Item Type Definitions based on its name and tenant namespace. It works with Mia-Platform Console v14.1.0 or later. - You need to specify the name and its tenant namespace, via the respective flags. The company-id flag can be omitted if it is already set in the context. + You need to specify the name via the respective flag. The company-id flag can be omitted if it is already set in the context and it is used as tenantId of the item type definition. ` - getCmdUse = "get --tenantId tenantId --name name" + getCmdUse = "get --name name" ) func GetCmd(options *clioptions.CLIOptions) *cobra.Command {