-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).
Description
Steps to reproduce
good.params.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "0.0.0.1",
"parameters": {
"var1": {
"value": "4"
},
"var2": {
"reference": {
"keyVault": {
"id": "<keyvault-resource-id>"
},
"secretName": "<secret-name>"
}
}
}
}$json = Get-Content $PSScriptRoot\good.params.json -Raw
$schemaUri = ($json | ConvertFrom-Json).'$schema' -replace "#.*"
[string]$schema = Invoke-WebRequest $schemaUri
Test-Json -Json $json -Schema $schemaExpected behavior
I have tested the schema and json in two online validators and neither had issues, so I would expect Test-Json to not throw an error.
Actual behavior
Test-Json : Cannot parse the JSON schema.
At /bugrepro.ps1:4 char:1
+ Test-Json -Json $json -Schema $schema
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Json], Exception
+ FullyQualifiedErrorId : InvalidJsonSchema,Microsoft.PowerShell.Commands.TestJsonCommand
Environment data
Name Value
---- -----
PSVersion 6.2.0
PSEdition Core
GitCommitId 6.2.0
OS Darwin 18.5.0 Darwin Kernel Version 18.5.…
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
GPugnet and rlvandaveer
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).