Allow aliasing resource type names

未关闭
#1,783 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
json, rust, yaml
领域
tooling

调研方向

Start by reading the resource manifest and configuration document schemas, then trace how resource type names and the configuration version field are handled. Done means aliases can be declared and used for both resource types and configuration fields, so the two example configurations work equivalently.

由索引模型根据 Issue 内容生成。

描述

Issue-Enhancement Needs Triage
Summary of the new feature / enhancement

Hi as DSC configuration administrator I see that wee need to have 2 different config for DSC resources to apply configuration

DSCv3


$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
metadata:
  author: "Michał"
  description: "WinGet packages converted from winget export"
contentVersion: "1.0"
resources:
  - name: Package-45
    type: Microsoft.WinGet/Package
    properties:
      id: Microsoft.WindowsTerminal
      source: winget
      version: 1.25.2733.0


winget DSC


$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
metadata:
  author: "Michał"
  description: "WinGet packages converted from winget export"
configurationVersion: 0.2.0
resources:
  - name: Package-45
    type: Microsoft.WinGet.DSC/WinGetPackage
    properties:
      id: Microsoft.WindowsTerminal
      source: winget
      version: 1.25.2733.0

So to make this transition easier I like to have aliases for some resources:

DSC resource: WinGet Microsoft.WinGet/Package --> Alias: Microsoft.WinGet.DSC/WinGetPackage
DSC : contentVersion --> Alias: configurationVersion

This will allow to generate the same config using simple approaches

Proposed technical implementation details (optional)

Example in schema implementation

{
    "$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
    "description": "",
    "tags": [
        "Windows",
        "dism",
        "feature"
    ],
    "type": "Microsoft.WinGet/Package" ,
    "Alias"": "Microsoft.WinGet.DSC/WinGetPackage",
    "version": "0.1.1"


}

主要语言
Rust
星标
544
派生
79
平均合并
2 天 2 小时
30 天内合并 PR
24

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PowerShell/DSC 的其他 Issue

查看 PowerShell/DSC 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。