arcus-azure / arcus.scripting

Scripting with Microsoft Azure in a breeze.
https://scripting.arcus-azure.net/
MIT License
9 stars 11 forks source link

Test-Json used in `Set-AzTableStorageEntities` fails for Powershell 7.4.0 #416

Closed pim-simons closed 7 months ago

pim-simons commented 7 months ago

Describe the bug Test-Json has been updated in Powershell 7.4.0, see https://learn.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-74?view=powershell-7.4.

Test-Json now uses Json.Schema.Net instead of Newtonsoft.Json.Schema. With this change, Test-Json no longer supports the older Draft 4 schemas. (#18141) (Thanks @gregsdennis!)

To Reproduce Run the integration tests.

Expected behavior No error, we need to look into the new way of using Test-Json.

gregsdennis commented 7 months ago

The PowerShell API hasn't changed, just the supported versions. You'll likely just need to update your schemas. There's a tool for that: AlterSchema.

pim-simons commented 7 months ago

The PowerShell API hasn't changed, just the supported versions. You'll likely just need to update your schemas. There's a tool for that: AlterSchema.

Apologies, I didn't mean to add you to this issue, copy-paste mishap... Many thanks for the AlterSchema tool, seems like this should be an easy fix! 👍🏻

gregsdennis commented 7 months ago

No worries. I like keeping tabs on these things. 🙂