microsoftgraph / microsoftgraph/msgraph-sdk-python

OData system query options "format" not implemented

Đang mở
#758 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

area:documentation priority:p1 status:needs-discussion type:bug
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

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu tại generated/users/users_request_builder.py và điểm vào UsersRequestBuilder.UsersRequestBuilderGetQueryParameters được sử dụng trong bản tái hiện. So sánh các tham số truy vấn được SDK hỗ trợ với tài liệu Microsoft Graph được liên kết và xác định xem format nên được triển khai hay loại bỏ khỏi ví dụ. Hoàn thành khi ví dụ Python không còn phát sinh ngoại lệ từ khóa không mong muốn và hành vi được ghi trong tài liệu khớp với SDK.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.