将现有的 swagger 导入 IBM API Connect 并将其从 CLI 添加到产品

Importing an existing swagger to IBM API Connect and adding it to a product from CLI

我正在努力通过 API Connect 发布现有的 swagger。为此,我需要导入一个现有的 yaml 文件(草稿),该文件位于我的本地文件夹中,并将其添加到现有产品中。但是,我找到了从头开始创建 api 的命令。有没有一种方法可以导入具有 Assemble 选项卡“详细信息 (x-ibm-configuration:....) 的 yaml 文件,并将其添加到产品并将产品暂存到目录中。

apic create --type api -h

以上命令只允许创建一个api。但是我需要导入一个现有的 yaml 文件。

请推荐。

要将定义推送到草稿,请使用此命令(如果不想替换现有草稿,可以跳过 -r):

"apic drafts:push "+ apiName +".yaml -r "+ apiName + ':' + apiVersion2Replace +" --organization '${deploymentOrganization}' --server '${deploymentServer}'"