-
Notifications
You must be signed in to change notification settings - Fork 29
Description
I'm not sure, if it is the right repository to post the issue, or it belongs to https://github.com/microsoft/json-schemas.
In PowerShell version 7.4 and beyond the Test-Json
cmdlet does not support JSON-Schema versions Draft 4 anymore, see:
"With this change, Test-Json no longer supports the older Draft 4 schemas"
https://learn.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-74?view=powershell-7.4#breaking-changes
Steps to reproduce:
Install PowerShell 7.4 or later (I have tested with version 7.5)
Get a local copy of MicrosoftTeams.Localization.schema.json, for example 'C:\temp\MicrosoftTeams.schema.json'
Assuming you have a valid Teams app manifest at location 'C:\temp\manifest.json'
Get-Content C:\temp\manifest.json -Raw | Test-Json -SchemaFile C:\temp\MicrosoftTeams.schema.json
results
Test-Json: Cannot parse the JSON schema.
False
expected result:
True
As far as I see, I get the expected result if I "upgrade" the line
"$schema": "http://json-schema.org/draft-04/schema#",
to (at least)
"$schema": "http://json-schema.org/draft-06/schema#",
It seems that Draft 4 is pretty old already (see https://json-schema.org/specification-links). Could you upgrade the schema version to a newer standard please? Further reference about the migrations:
https://json-schema.org/specification/migration.