Inconsistent usage of 'select' OData system query option
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Tái hiện yêu cầu trong Developer Graph Explorer và thông qua Python msgraph SDK, tập trung vào các endpoint items và items/{id}/versions. Theo dõi cách SDK tuần tự hóa các tùy chọn truy vấn hệ thống OData và so sánh các yêu cầu sử dụng '$select' với hành vi được ghi nhận trong tài liệu. Hoàn thành khi các phản hồi list-items và versions hợp lệ hoạt động cùng với '$select' và '$expand'.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 630
- Fork
- 96
- Merge trung bình
- 15 giờ 20 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoftgraph/msgraph-sdk-python
-
status:waiting-for-triage type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
microsoftgraph/msgraph-sdk-python#1570 ·
-
status:waiting-for-triage type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoftgraph/msgraph-sdk-python#1563 ·
-
Needs: Attention :wave: type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoftgraph/msgraph-sdk-python#1287 · 2 bình luận · 1 reaction ·
-
Batch Request Support Đang mởstatus:waiting-for-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
microsoftgraph/msgraph-sdk-python#1557 ·
-
status:waiting-for-triage type:bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
microsoftgraph/msgraph-sdk-python#1556 · 1 bình luận · 1 reaction ·
Tất cả issue của microsoftgraph/msgraph-sdk-python
Issue tương tự
-
from:qa priority:P2 reliability tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
spec-kitty/spec-kitty#4874 ·
-
fix: inaccuracy ⚠️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
uabrc/uabrc.github.io#1255 · 1 bình luận ·
-
kind:bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ethereum-optimism/factory#64 ·