Return generated model instances from connector operations
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 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
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 10
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/connectors-python-sdk 的其他 Issue
-
enhancement
难度 4/5 3-5 天 新手友好度 68/100
查看 Azure/connectors-python-sdk 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·