Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ApiOps CLI Publisher fails with empty urlTemplate error.

オープン
#317 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
api, cli

調査の方向性

Start with the supplied operationInformation.json for notification-socket-v1/operations/onHandshake and trace how apiops publish processes its urlTemplate. Reproduce with the command and artifact described in the issue; done means the WebSocket handshake operation can be published with an empty urlTemplate.

索引モデルが issue の本文から書いたものです。

説明

type:bug
Command that triggered the bug

npx apiops publish

Expected behavior

The publisher pipeline can publish the Websocket onHandshake API with a empty urlTemplate.

Actual behavior

Our Publisher pipeline is failing when running the apiops publish command with this error:

The Command from the pipeline:

npx apiops publish `
            --resource-group '${{ parameters.resourceGroupName }}' `
            --service-name '${{ parameters.apiManagementServiceName }}' `
            --source '${{ parameters.artifactSource }}' `
            --overrides '${{ parameters.configurationPath }}' `
            --subscription-id $subscriptionId `
            --commit-id '$(Build.SourceVersion)'

The Error:

ERROR PUT apioperation/notification-socket-v1/onHandshake: HTTP 400: {"error":{"code":"ValidationError","message":"One or more fields contain incorrect values:","details":[{"code":"ValidationError","target":"urlTemplate","message":"'urlTemplate' should not be empty."}]}}

The API is a WebSocket API & the Socket is opening a handshake to the PubSub. We need an empty urlTemplate for it because we cant change it in azure.

This is the artifact file from it (apim-artifacts\apis\notification-socket-v1\operations\onHandshake\operationInformation.json):

{
  "id": "/subscriptions/<>/resourceGroups/<>/providers/Microsoft.ApiManagement/service/<>/apis/notification-socket-v1/operations/onHandshake",
  "type": "Microsoft.ApiManagement/service/apis/operations",
  "name": "onHandshake",
  "properties": {
    "displayName": "onHandshake",
    "method": "GET",
    "urlTemplate": "",
    "templateParameters": [],
    "description": "WebSocket opening handshake",
    "responses": [],
    "policies": null,
    "effectivePath": null
  }
}
apiops CLI version

1.0.4

Environment details
  • Image: ubuntu-latest
  • NodeJs: 22.x
CI/CD environment

Azure DevOps

Is this bug blocking you?

Yes

主要言語
TypeScript
スター
29
フォーク
11
平均マージ
1日 15時間
マージ済み PR(30日)
15

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/apiops-cli のほかの issue

Azure/apiops-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。