Inconsistent usage of 'select' OData system query option
まだ誰も着手していません。
評価
調査の方向性
Developer Graph Explorer と Python msgraph SDK を使ってリクエストを再現し、items と items/{id}/versions エンドポイントに重点を置きます。SDK が OData システムクエリオプションをどのようにシリアライズするかを追跡し、'$select' を使用するリクエストを文書化された動作と比較します。'$select' と '$expand' を併用して、有効な list-items および versions のレスポンスが機能すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When I query the SharePoint API using 'expand' and 'select' query options, the API expects 'select' and not '$select'.
This is not a huge problem as I can easily change my query params to use 'select', however we cannot use the Python msgraph SDK as it always converts the special system query options with a $ prepended.
To Reproduce
Steps to reproduce the behavior:
- Using the Developer Graph Explorer run a query similar to this:
/items$expand=fields&$select=fields/status,lastModifiedDateTime,id
- See error:
{ "error": { "code": "BadRequest", "message": "Parsing OData Select and Expand failed: Found a path with multiple navigation properties or a bad complex property path in a select clause. Please reword your query such that each level of select or expand only contains either TypeSegments or Properties.", "innerError": { "date": "2024-04-09T18:29:12", "request-id": "60cb4f4b-e5f4-48ee-8f1c-981e88440310", "client-request-id": "ed396593-a29f-0d6b-d2d7-d8dc632e4edc" } } }
Workaround
4.Change the '$select' query param to 'select' (without the dollar sign) and you get a valid response.
/items$expand=fields&select=fields/status,lastModifiedDateTime,id
Expected behavior
A valid listitems response from the API using $select
Additional context
This also happens on the items/{id}/versions endpoint
Documentation for OData query options indicates $select as the query param:
https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview
- 主要言語
- Python
- スター
- 630
- フォーク
- 96
- 平均マージ
- 15時間 20分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-python のほかの issue
-
status:waiting-for-triage type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
microsoftgraph/msgraph-sdk-python#1570 ·
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoftgraph/msgraph-sdk-python#1563 ·
-
Needs: Attention :wave: type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microsoftgraph/msgraph-sdk-python#1287 · コメント 2 件 · リアクション 1 件 ·
-
status:waiting-for-triage
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
microsoftgraph/msgraph-sdk-python#1557 ·
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
microsoftgraph/msgraph-sdk-python#1556 · コメント 1 件 · リアクション 1 件 ·
microsoftgraph/msgraph-sdk-python の issue をすべて見る
似ている issue
-
🐛 Bug 🔔 Pending processing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
jumpserver/jumpserver#17584 ·
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·