Azure APIM 导入 OpenAPI 规范在 GitHub 构建操作中失败

问题描述 投票:0回答:1

从我的 GitHub Build 操作登录到 Azure 后,我尝试更新我的 APIM OpenAPI 规范以使其与我的源代码保持同步。

我尝试通过执行以下命令来做到这一点:

   - name: Update APIM Specification uses: azure/CLI@v1 with: azcliversion: 2.0.72 inlineScript: | az apim api import --resource-group prod-rg --service-name MyAppAPI --path /myapp/v1 --specification-format OpenApi --specification-path ./openapi_spec.yaml --api-id my-app --subscription-required false

我期待该行动能够成功执行。 不幸的是我收到以下错误:

Starting script execution via docker image mcr.microsoft.com/azure-cli:2.0.72 ERROR: az apim: 'api' is not in the 'az apim' command group. See 'az apim --help'. Error: Error: az cli script failed.

我已阅读文档,但不清楚为什么它无法运行。 我正在“奔跑”:

runs-on: ubuntu-latest
github-actions openapi azure-api-management
1个回答
0
投票

根据文档:https://learn.microsoft.com/en-us/cli/azure/release-notes-azure-cli#august-04-2020

az apim api import
仅在版本2.10.0中添加。

© www.soinside.com 2019 - 2024. All rights reserved.