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

[BUG] Publisher sends GraphQL schema to service-level API path instead of workspace path

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
azure, csharp, graphql
領域
api, cloud

調査の方向性

publisher の GraphQL スキーマの PUT パス構築から始め、issue に記載された workspace-aware API パスと比較します。APIM workspace で GraphQL API を公開して再現し、その後、リクエストが workspaces/{workspaceId}/apis/{apiId}/schemas/graphql を使用し、403 エラーなしでデプロイに成功することを確認します。

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

説明

Release version

APIOps Toolkit for Azure APIM v7.0.2

Describe the bug

When publishing a GraphQL API that belongs to a workspace, the publisher constructs the wrong URI for the GraphQL schema PUT. It targets the service-level API schemas endpoint instead of the workspace-scoped one, causing a 403 AuthorizationFailed error.

The failing request:

PUT .../service/{serviceName}/apis/{apiId}/schemas/graphql

Expected request:

PUT .../service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/graphql
Expected behavior

Publisher successfully PUTs the GraphQL schema to workspaces/{workspaceId}/apis/{apiId}/schemas/graphql and the API deploys without error.

Actual behavior

Publisher fails with HTTP 403:

System.Net.Http.HttpRequestException: HTTP request to URI
https://management.azure.com/subscriptions/{sub}/resourceGroups/{rg}/providers/
Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/graphql
?api-version=2024-05-01 failed with status code 403.
Content is '{"error":{"code":"AuthorizationFailed","message":"The client '...'
does not have authorization to perform action
'Microsoft.ApiManagement/service/apis/schemas/write' over scope
'.../service/{serviceName}/apis/{apiId}/schemas/graphql'
or the scope is invalid."}}'.
Reproduction Steps
  1. Create a GraphQL API inside an APIM workspace.
  2. Run the extractor — specification.graphql is written correctly (extractor is unaffected).
  3. Run the publisher against a different environment — it fails with 403.
主要言語
C#
スター
448
フォーク
247
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

Azure/apiops のほかの issue

Azure/apiops の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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