Return generated model instances from connector operations
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Start with the CodefulSdkGenerator and the generated connector clients described in the issue, then inspect the pinned connector contracts and the serialization/deserialization tests. Trace modeled and unmodeled response handling, including nested models, collections, optional fields, and wire-name mappings. Done means generated artifacts, API documentation, compatibility behavior, and tests match the paired AzureUX-BPM generator revision.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Generated connector clients expose response model classes, but operation methods currently deserialize JSON responses to weak dictionary types. For example, Office365Client.get_emails_async returns dict[str, Any] | None rather than an instance of its generated response model. This prevents callers and documentation from relying on typed response properties.
Identified in PR #89 review.
Proposed work
- Update the CodefulSdkGenerator to emit precise operation return annotations when the managed connector contract defines a response schema.
- Deserialize JSON responses into the corresponding generated model classes, including nested models, collections, optional fields, and wire-name mappings.
- Preserve dictionary, binary, text, and empty-response behavior when no generated response model applies.
- Regenerate affected connector clients from pinned contracts and link the paired AzureUX-BPM generator PR.
- Update API documentation after typed responses are available.
Acceptance criteria
- Connector operations with modeled response schemas return generated model instances rather than
dict[str, Any]. - Return annotations distinguish modeled, unmodeled, binary, text, and no-content responses.
- Serialization/deserialization tests cover nested objects, collections, optional fields, and wire-name mappings.
- Existing connector behavior remains compatible for responses without modeled schemas.
- Generated artifacts match the paired generator revision.
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 3
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 10
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 Azure/connectors-python-sdk
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
Tất cả issue của Azure/connectors-python-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
browser-use/browser-use#5905 ·
-
type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ynput/ayon-python-api#363 ·
-
bug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
modelscope/FunASR#3728 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
open-compass/opencompass#2655 ·