Inconsistent usage of 'select' OData system query option
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Riprodurre la richiesta in Developer Graph Explorer e tramite l'SDK Python msgraph, concentrandosi sugli endpoint items e items/{id}/versions. Tracciare il modo in cui l'SDK serializza le opzioni di query di sistema OData e confrontare le richieste che usano '$select' con il comportamento documentato. Il lavoro è completato quando risposte valide di list-items e versions funzionano insieme a '$select' e '$expand'.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 630
- Fork
- 96
- Merge medio
- 15h 20m
- PR unite (30g)
- 3
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoftgraph/msgraph-sdk-python
-
status:waiting-for-triage type:bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
microsoftgraph/msgraph-sdk-python#1570 ·
-
status:waiting-for-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoftgraph/msgraph-sdk-python#1563 ·
-
Needs: Attention :wave: type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
microsoftgraph/msgraph-sdk-python#1287 · 2 commenti · 1 reazione ·
-
Batch Request Support Apertastatus:waiting-for-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
microsoftgraph/msgraph-sdk-python#1557 ·
-
status:waiting-for-triage type:bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
microsoftgraph/msgraph-sdk-python#1556 · 1 commento · 1 reazione ·
Tutte le issue di microsoftgraph/msgraph-sdk-python
Issue simili
-
link-check link-check:sphinx-theme
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
CSCfi/sd-search-api#39 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100