Tried to add JSON Schema to VS Code and I can't get it to work #815
Unanswered
IlleNilsson
asked this question in
Q&A
Replies: 3 comments 6 replies
-
Hi @IlleNilsson, I went through the same exercise, but slightly altered the example grabbed from this link. {
"json.schemas": [
{
"fileMatch": [
"**/*.dsc.json",
"**/*.dsc.config.json"
],
"url": "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json"
}
],
"yaml.schemas": {
"https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json": "**.dsc.{yaml,yml,config.yaml,config.yml}"
}
} When I'm creating a file now in VSCode, it gives me the IntelliSense I'm looking for. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks, I’ll try that
…________________________________
From: Gijs Reijn ***@***.***>
Sent: Friday, May 16, 2025 7:48:40 AM
To: PowerShell/DSC ***@***.***>
Cc: Ilian Nilsson ***@***.***>; Mention ***@***.***>
Subject: Re: [PowerShell/DSC] Tried to add JSON Schema to VS Code and I can't get it to work (Discussion #815)
Hi @IlleNilsson<https://github.com/IlleNilsson>,
I went through the same exercise, but slightly altered the example grabbed from this link<https://learn.microsoft.com/en-us/powershell/dsc/concepts/enhanced-authoring?view=dsc-3.0#using-the-enhanced-configuration-document-schema>.
{
"json.schemas": [
{
"fileMatch": [
"**/*.dsc.json",
"**/*.dsc.config.json"
],
"url": "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json"
}
],
"yaml.schemas": {
"https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json": "**.dsc.{yaml,yml,config.yaml,config.yml}"
}
}
When I'm creating a file now in VSCode, it gives me the IntelliSense I'm looking for.
image.png (view on web)<https://github.com/user-attachments/assets/8509b828-a3fc-45f8-8427-ece47c33990b>
—
Reply to this email directly, view it on GitHub<#815 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AID6F4FAU3HLD6RX3NWZPHT26V33RAVCNFSM6AAAAAB5GIEIFSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMJWGY3DCNY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Tried it and worked some what, getting errors on parameters and metadata json schema files
…________________________________
From: Ilian Nilsson ***@***.***>
Sent: Friday, May 16, 2025 8:09:23 AM
To: PowerShell/DSC ***@***.***>; PowerShell/DSC ***@***.***>
Cc: Mention ***@***.***>
Subject: Re: [PowerShell/DSC] Tried to add JSON Schema to VS Code and I can't get it to work (Discussion #815)
Thanks, I’ll try that
________________________________
From: Gijs Reijn ***@***.***>
Sent: Friday, May 16, 2025 7:48:40 AM
To: PowerShell/DSC ***@***.***>
Cc: Ilian Nilsson ***@***.***>; Mention ***@***.***>
Subject: Re: [PowerShell/DSC] Tried to add JSON Schema to VS Code and I can't get it to work (Discussion #815)
Hi @IlleNilsson<https://github.com/IlleNilsson>,
I went through the same exercise, but slightly altered the example grabbed from this link<https://learn.microsoft.com/en-us/powershell/dsc/concepts/enhanced-authoring?view=dsc-3.0#using-the-enhanced-configuration-document-schema>.
{
"json.schemas": [
{
"fileMatch": [
"**/*.dsc.json",
"**/*.dsc.config.json"
],
"url": "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json"
}
],
"yaml.schemas": {
"https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json": "**.dsc.{yaml,yml,config.yaml,config.yml}"
}
}
When I'm creating a file now in VSCode, it gives me the IntelliSense I'm looking for.
image.png (view on web)<https://github.com/user-attachments/assets/8509b828-a3fc-45f8-8427-ece47c33990b>
—
Reply to this email directly, view it on GitHub<#815 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AID6F4FAU3HLD6RX3NWZPHT26V33RAVCNFSM6AAAAAB5GIEIFSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMJWGY3DCNY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Added DSC V3 JSON Schema Uri to VS Code settings.json like this:
Problems loading reference 'https://aka.ms/PowerShell/DSC/main/schemas/v3/config/document.resource.json': Unable to parse content from 'https://aka.ms/PowerShell/DSC/main/schemas/v3/config/document.resource.json': Parse error at offset 0.
Is what I get editing a DSC V3 document with: $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions