PowerShell / PowerShell/DSC

VS Code resource manifest schema error

Open
#917 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
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

The https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json resource schema in VS code is throwing an error.

Steps to reproduce

Open document in VS code.

{
  "$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
  "type": "OpenDsc.Windows/Service",
  "description": "Manage Windows Services",
  "tags": [
    "Windows"
  ],
  "version": "0.1.0",
  "get": {
    "executable": "windows-service",
    "args": [
      "config",
      "get",
      {
        "jsonInputArg": "--input",
        "mandatory": true
      }
    ]
  },
  "export": {
    "executable": "windows-service",
    "args": [
      "config",
      "export"
    ]
  },
  "exitCodes": {
    "0": "Success",
    "1": "Invalid parameter",
    "2": "Generic Failure",
    "3": "Invalid JSON",
    "4": "Failed to get services"
  },
  "schema": {
    "command": {
      "executable": "windows-service",
      "args": [
        "schema"
      ]
    }
  }
}
Expected behavior
Schema works
Actual behavior
Problems loading reference 'https://aka.ms/PowerShell/DSC/main/schemas/v3/resource/manifest.adapter.json': Unable to parse content from 'https://aka.ms/PowerShell/DSC/main/schemas/v3/resource/manifest.adapter.json': Parse error at offset 0.(768)

Manifest Schema

This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.
Error details

Environment data
Latest VS code with json.schemas


"json.schemas": [
    
    {
      "fileMatch": [
        "**/*.dsc.json",
        "**/*.dsc.config.json"
      ],
      "url": "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json"
    },
    {
      "fileMatch": [
        "**/*.dsc.resource.json",
      ],
      "url": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json"
    }
  ]
Version

3.2-preview1

Visuals

Image

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

Start with the configured manifest.vscode.json URL and the bundled resource manifest schema referenced in the report. Reproduce the error by opening the supplied manifest in VS Code, then compare the referenced manifest.adapter.json response with the schema URL; done means the schema loads without a parse error and the manifest validates.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.