microsoftgraph / microsoftgraph/msgraph-sdk-python
OData system query options "format" not implemented
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 630
- Fork
- 96
- Merge medio
- 15h 20m
- PR unite (30g)
- 3
Descrizione
Describe the bug
In the documentation there is the Query "format" introduced that is supposed specify the media format that the requests returns.
Since the method is not implemented, the given example code for python throws an exception:
Traceback (most recent call last):
File "/.../develop.py", line 37, in <module>
query_params = UsersRequestBuilder.UsersRequestBuilderGetQueryParameters(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: UsersRequestBuilder.UsersRequestBuilderGetQueryParameters.__init__() got an unexpected keyword argument 'format'
Expected behavior
I would to be able to format the responses as needed. As a suboptimal solution the docs should not refer to nonexisting methods.
How to reproduce
from msgraph import GraphServiceClient
from msgraph.generated.users.users_request_builder import UsersRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
query_params = UsersRequestBuilder.UsersRequestBuilderGetQueryParameters(
format = "json",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
async def work():
return await graph_client.users.get(request_configuration = request_configuration)
response = asyncio.run(work())
SDK Version
1.4.0
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.
Direzione di ricerca
Inizia da generated/users/users_request_builder.py e dal punto di ingresso UsersRequestBuilder.UsersRequestBuilderGetQueryParameters utilizzato nella riproduzione. Confronta i parametri di query supportati dall'SDK con la documentazione Microsoft Graph collegata e determina se format debba essere implementato o rimosso dall'esempio. Il lavoro è completato quando l'esempio Python non genera più l'eccezione per una parola chiave imprevista e il comportamento documentato corrisponde a quello dell'SDK.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100