Allow aliasing resource type names

クローズ
#1,783 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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日 27分
マージ済み PR(30日)
25

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PowerShell/DSC のほかの issue

PowerShell/DSC の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。