microsoftgraph / microsoftgraph/msgraph-sdk-python

OData system query options "format" not implemented

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

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

area:documentation priority:p1 status:needs-discussion type:bug
主要言語
Python
スター
630
フォーク
96
平均マージ
15時間 20分
マージ済み PR(30日)
3

説明

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

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

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

はじめの一歩

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

調査の方向性

generated/users/users_request_builder.py と、再現で使用されているエントリポイント UsersRequestBuilder.UsersRequestBuilderGetQueryParameters から開始します。SDK がサポートするクエリパラメーターをリンク先の Microsoft Graph ドキュメントと比較し、format を実装するべきか、例から削除するべきかを判断します。Python の例で予期しないキーワード引数の例外が発生しなくなり、文書化された動作が SDK と一致すれば完了です。

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

評価

技術スタック
python
領域
api
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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