Closed ChristopherGLewis closed 5 years ago
@filizt Can you verify that the output type being returned by the cmdlet is correct? The documentation shows System.Object. https://docs.microsoft.com/en-us/powershell/module/az.blueprint/get-azblueprint?view=azps-2.0.0
@filizt Can you verify that the output type being returned by the cmdlet is correct? The documentation shows System.Object. https://docs.microsoft.com/en-us/powershell/module/az.blueprint/get-azblueprint?view=azps-2.0.0
Looking.
Hey @ChristopherGLewis - current behavior is expected since we made some design decisions in the past and what you see (versions field type being JObject) is manifestation of that. That being said, our team agreed that we should provide a better experience here, so I'm working on a fix. It should be going out in the next release of AzBlueprint module.
@filizt I would highly advise against exposing any types from the Newtonsoft.Json
library. The version of this library that is used is directly linked to the version of PowerShell you are using (Windows PowerShell, PowerShell Core 6.0/6.1/6.2). So, you may have significant issues when users try to run the cmdlets in these different environments. Here's just a small informational table showing the version differences:
Windows PowerShell 5.1 | PowerShell Core 6.0 | PowerShell Core 6.1 | PowerShell Core 6.2 | |
---|---|---|---|---|
Newtonsoft.Json | 6.0.8 | 10.0.3 | 11.0.2 | 12.0.1 |
I don’t believe any of the other Az cmdlets expose anything but standard PowerShell objects.
I wasn’t looking forwards to re-learning jobject parsing...
Description
get-AzBlueprint's version field is returned as a JObject, not a powershell object You can see this with a simple GetType()
EDIT: bug report lost all details - replacing
Steps to reproduce
Environment data
Module versions
Debug output
Error output