[MsGraph] Command models expose a reduced property set, so Format-List * and -Select cannot surface full Graph payload

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
csharp, powershell
Lĩnh vực
cli

Hướng nghiên cứu

Start by comparing the Application model with User, Group and DirectoryObject, which already carry the [JsonExtensionData] bag, then read the TypeSpec/codegen template that emits these models to see whether the bag can be added for every type. Decide with maintainers whether to expose all Graph fields or a curated subset before writing code. Done means Get-AzMsGraphApplication -Id <appId> | Format-List * shows the fields Graph returned, or an agreed explicit property set is modeled.

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

Mô tả

act-codegen-extensibility-squad act-identity-squad
Target surface

Both

What problem are you trying to solve?

The MsGraph command models keep only a small subset of the fields Microsoft Graph returns, with no extension-data capture. As a result, properties that Graph actually returned are dropped during deserialization, so Format-List *, Select-Object , and -Select cannot surface them. Users cannot retrieve the full object even when Graph sent it.

  1. Get-AzMsGraphApplication -Id
  2. Pipe to Format-List *
  3. Only the modeled fields appear, not the full set Graph returned.
Proposed solution
Option 1 (interim): add an extension-data bag to Application. Mirror the pattern User, Group, and DirectoryObject already use, so unmapped Graph fields are retained:
[JsonExtensionData]
public Dictionary<string, JsonElement>? AdditionalProperties { get; set; }

Option 2 (proper fix): let codegen emit the full set. Since these models are codegen-owned, have the generator or TypeSpec model template either emit the complete property set for each type or always include the [JsonExtensionData] bag. That closes the gap consistently across all current and future models rather than patching one model at a time.
Alternatives or workarounds

No response

Additional context

We need to consider what properties we want to expose. There is a lot of them and they may not add user value and instead create noise.
If this is the case and we want a subset only we need to move the AdditionalProperties from all the commands and manually add the full model of what we do want to expose.

Ngôn ngữ chính
C#
Star
18
Fork
10
Merge trung bình
1 ngày 20 giờ
Pull request đã merge (30 ngày)
157

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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.

Issue khác của Azure/azclips

Tất cả issue của Azure/azclips

Issue tương tự

Thêm issue về C#

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.