Return generated model instances from connector operations
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start with the CodefulSdkGenerator and the generated connector operation methods, using the PR #89 review and pinned contracts as context. Trace how modeled and unmodeled responses are currently represented, then review the serialization/deserialization test coverage requested for nested models, collections, optional fields, and wire-name mappings. Done means generated artifacts, annotations, behavior, tests, and API documentation match the paired generator revision.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Python
- 星號
- 0
- 分支
- 3
- 平均合併
- 6 天 11 小時
- 30 天內合併 PR
- 8
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Azure/connectors-python-sdk 的其他 Issue
-
Support scalar-only union values in generated connector property maps (Python)可能已有人在做 @daviburg 於 1 天前認領。 未關閉
難度 5/5 一週以上 新手友好度 38/100
Azure/connectors-python-sdk#104 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 30/100
Azure/connectors-python-sdk#91 ·
維護者通常 1 天內回覆
查看 Azure/connectors-python-sdk 的全部 Issue
相似的 Issue
-
bug P1
難度 2/5 1-3 小時 新手友好度 76/100
Toloka/tolokaforge#1947 ·
維護者通常 1 天內回覆
-
SageMaker provider: streaming fails with NoStreamDataError on DJL Serving (LMI) endpoints可能已有人在做 @balajiaru 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 88/100
UKGovernmentBEIS/inspect_ai#6127 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
letsencrypt/cp-cps#361 ·
-
難度 2/5 1-3 小時 新手友好度 65/100