PowerShell / PowerShell/DSC

Schema references using $ref cannot be loaded by DSC engine

Open
#1,033 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Need-Review
Dominant language
Rust
Stars
523
Forks
75
Avg merge
3d 16h
Merged PRs (30d)
24

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Summary

When $ref is used to refer to _exists schema from DSC repository, DSC engine fails to access it with the following error:

ERROR Error: Schema: Resource 'https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/exist.json' is not present in a registry and retrieving it failed: resolve-http feature or a custom resolver is required to resolve external schemas via HTTP

Steps to reproduce
  1. Resource manifest has:
              "_exist": {
                    "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/exist.json"
                }
Expected behavior
should get the $ref schema
Actual behavior
Error
Error details
ERROR Error: Schema: Resource 'https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/exist.json' is not present in a registry and retrieving it failed: `resolve-http` feature or a custom resolver is required to resolve external schemas via HTTP
Environment data
N/A
Version

3.2.0-preview.3

Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin at the DSC engine schema-loading path that emits the resolve-http error, using the resource manifest example with the external $ref to reproduce it. Done means the referenced schema from the DSC repository is loaded successfully instead of producing the registry and resolver error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.