diff --git a/CHANGELOG.md b/CHANGELOG.md index 47fd518..70f26b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [2.1.5] - 2026-09-19 + +### Fixed + +- `New-PlasterManifest` and JSON conversion paths emitted a `$schema` URL + that returned HTTP 404; updated all schema call sites and examples to + use the valid schema URL + ([#478](https://github.com/PowerShellOrg/Plaster/pull/478), + closes [#477](https://github.com/PowerShellOrg/Plaster/issues/477)) + ## [2.1.4] - 2026-09-13 ### Fixed diff --git a/Plaster/Plaster.psd1 b/Plaster/Plaster.psd1 index ce36063..eb356c2 100644 --- a/Plaster/Plaster.psd1 +++ b/Plaster/Plaster.psd1 @@ -6,7 +6,7 @@ GUID = 'cfce3c5e-402f-412a-a83a-7b7ee9832ff4' # Version number of this module. - ModuleVersion = '2.1.4' + ModuleVersion = '2.1.5' # Supported PSEditions CompatiblePSEditions = @('Desktop', 'Core') diff --git a/Plaster/Private/New-JsonManifestStructure.ps1 b/Plaster/Private/New-JsonManifestStructure.ps1 index f66209c..a7a5342 100644 --- a/Plaster/Private/New-JsonManifestStructure.ps1 +++ b/Plaster/Private/New-JsonManifestStructure.ps1 @@ -28,7 +28,7 @@ function New-JsonManifestStructure { ) $manifest = [ordered]@{ - '$schema' = 'https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json' + '$schema' = 'https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json' 'schemaVersion' = '2.0' 'metadata' = [ordered]@{ 'name' = $TemplateName diff --git a/Plaster/Public/ConvertTo-JsonManifest.ps1 b/Plaster/Public/ConvertTo-JsonManifest.ps1 index 7aa90b7..7a4d7f4 100644 --- a/Plaster/Public/ConvertTo-JsonManifest.ps1 +++ b/Plaster/Public/ConvertTo-JsonManifest.ps1 @@ -53,7 +53,7 @@ function ConvertTo-JsonManifest { process { try { $jsonObject = [ordered]@{ - '$schema' = 'https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json' + '$schema' = 'https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json' 'schemaVersion' = '2.0' } diff --git a/Plaster/Public/New-PlasterManifest.ps1 b/Plaster/Public/New-PlasterManifest.ps1 index 784c303..34bcec8 100644 --- a/Plaster/Public/New-PlasterManifest.ps1 +++ b/Plaster/Public/New-PlasterManifest.ps1 @@ -96,7 +96,7 @@ function New-PlasterManifest { if ($Format -eq 'JSON') { # Create JSON manifest $jsonManifest = [ordered]@{ - '$schema' = 'https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json' + '$schema' = 'https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json' 'schemaVersion' = '2.0' 'metadata' = [ordered]@{ 'name' = $TemplateName diff --git a/Plaster/Schema/plaster-manifest-v2.json b/Plaster/Schema/plaster-manifest-v2.json index 49af49c..f158cfc 100644 --- a/Plaster/Schema/plaster-manifest-v2.json +++ b/Plaster/Schema/plaster-manifest-v2.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json", + "$id": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "title": "Plaster Template Manifest v2.0", "description": "JSON schema for Plaster 2.0 template manifests", "type": "object", diff --git a/README.md b/README.md index b9bfa03..b6c6e77 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ code plasterManifest.xml ### JSON Manifest Example ```json { - "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "name": "MyTemplate", diff --git a/demos/templates/02-json-greeter/plasterManifest.json b/demos/templates/02-json-greeter/plasterManifest.json index 8cb9d61..256ecdd 100644 --- a/demos/templates/02-json-greeter/plasterManifest.json +++ b/demos/templates/02-json-greeter/plasterManifest.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "name": "JsonGreeter", diff --git a/demos/templates/03-json-module/plasterManifest.json b/demos/templates/03-json-module/plasterManifest.json index d374624..9265759 100644 --- a/demos/templates/03-json-module/plasterManifest.json +++ b/demos/templates/03-json-module/plasterManifest.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "name": "AcmeModule", diff --git a/examples/NewModule/plasterManifest.json b/examples/NewModule/plasterManifest.json index ca2239a..f7265a0 100644 --- a/examples/NewModule/plasterManifest.json +++ b/examples/NewModule/plasterManifest.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "id": "dcd95744-8abc-4ecb-a439-bf2cd37821bb", diff --git a/examples/NewPowerShellScript/plasterManifest.json b/examples/NewPowerShellScript/plasterManifest.json index 86f3bc0..876b2d7 100644 --- a/examples/NewPowerShellScript/plasterManifest.json +++ b/examples/NewPowerShellScript/plasterManifest.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/PowerShell/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "id": "635046f0-a59b-46a0-b6b3-892084707467", diff --git a/examples/TemplateModule/TemplateOne/plasterManifest.json b/examples/TemplateModule/TemplateOne/plasterManifest.json index e304dc9..92598eb 100644 --- a/examples/TemplateModule/TemplateOne/plasterManifest.json +++ b/examples/TemplateModule/TemplateOne/plasterManifest.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/PowerShell/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "id": "635046f0-a59b-46a0-b6b3-892084707467", diff --git a/examples/TemplateModule/TemplateTwo/plasterManifest.json b/examples/TemplateModule/TemplateTwo/plasterManifest.json index fca3af2..c1be1ea 100644 --- a/examples/TemplateModule/TemplateTwo/plasterManifest.json +++ b/examples/TemplateModule/TemplateTwo/plasterManifest.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/PowerShell/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "id": "76a18e25-3c2f-4266-9a6f-64cdef44de94", diff --git a/examples/plasterManifest-validatePattern.json b/examples/plasterManifest-validatePattern.json index 849e082..f7265a0 100644 --- a/examples/plasterManifest-validatePattern.json +++ b/examples/plasterManifest-validatePattern.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/PowerShell/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "id": "dcd95744-8abc-4ecb-a439-bf2cd37821bb", diff --git a/examples/plasterManifest.json b/examples/plasterManifest.json index 65dd8eb..b61b588 100644 --- a/examples/plasterManifest.json +++ b/examples/plasterManifest.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/PowerShell/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "id": "38bd80d9-3a47-4916-9220-bed383d90876", diff --git a/examples/plasterManifest_fr-FR.json b/examples/plasterManifest_fr-FR.json index bb89b65..ab39284 100644 --- a/examples/plasterManifest_fr-FR.json +++ b/examples/plasterManifest_fr-FR.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/PowerShell/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "id": "38bd80d9-3a47-4916-9220-bed383d90876", diff --git a/tests/ConditionEval.Tests.ps1 b/tests/ConditionEval.Tests.ps1 index 819006c..20cb5ce 100644 --- a/tests/ConditionEval.Tests.ps1 +++ b/tests/ConditionEval.Tests.ps1 @@ -151,7 +151,7 @@ Describe 'Condition Attribute Evaluation Tests' { @' { - "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "name": "TemplateName", @@ -193,7 +193,7 @@ Describe 'Condition Attribute Evaluation Tests' { @' { - "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "name": "TemplateName", @@ -242,7 +242,7 @@ Describe 'Condition Attribute Evaluation Tests' { @' { - "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/v2/schema/plaster-manifest-v2.json", + "$schema": "https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json", "schemaVersion": "2.0", "metadata": { "name": "TemplateName", diff --git a/tests/ConvertTo-JsonManifest.Tests.ps1 b/tests/ConvertTo-JsonManifest.Tests.ps1 index 85d02e2..43fa787 100644 --- a/tests/ConvertTo-JsonManifest.Tests.ps1 +++ b/tests/ConvertTo-JsonManifest.Tests.ps1 @@ -53,7 +53,7 @@ Describe 'ConvertTo-JsonManifest' { It 'Includes the $schema and schemaVersion fields' { $json = ConvertTo-JsonManifest -XmlManifest (New-XmlManifest) | ConvertFrom-Json - $json.'$schema' | Should -Not -BeNullOrEmpty + $json.'$schema' | Should -Be 'https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json' $json.schemaVersion | Should -Be '2.0' } diff --git a/tests/New-PlasterManifest.Tests.ps1 b/tests/New-PlasterManifest.Tests.ps1 index 391300c..4180f92 100644 --- a/tests/New-PlasterManifest.Tests.ps1 +++ b/tests/New-PlasterManifest.Tests.ps1 @@ -239,6 +239,7 @@ Describe 'New-PlasterManifest JSON Format Tests' { Test-Path $PlasterManifestPath | Should -Be $true $content = Get-Content $PlasterManifestPath -Raw | ConvertFrom-Json + $content.'$schema' | Should -Be 'https://raw.githubusercontent.com/PowerShellOrg/Plaster/main/Plaster/Schema/plaster-manifest-v2.json' $content.schemaVersion | Should -Be '2.0' $content.metadata.name | Should -Be 'JsonTemplate' $content.metadata.id | Should -Be '1a1b0933-78b2-4a3e-bf48-492591e69521'