-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When the cmdlet finds an issue in the data, the output also contains all parents of that item. This means that a single (small) issue in the data can result in big list of errors. Would be great to either:
- Add an
-IgnoreParentparameter that ignores all parent errors - Or change the default behaviour to not include parents add an
-IncludeParentsparameter to specify that you are interested in the parents as well.
Reproduction:
$data = @{
NonNodeData = @{
AzureAD = @{
IncorrectParameterName = @(
@{
Param1 = 8
}
)
}
}
}
$schema = @{
NonNodeData = @{
'@Type' = 'PSMapNode'
AzureAD = @{
'@Type' = 'PSMapNode'
}
}
}
$result = $data | Test-Object $schema
$resultOutput:
Path Value Valid Issue
---- ----- ----- -----
NonNodeData.AzureAD @{IncorrectPa…=@(…)} [X] The following nodes are not accepted: IncorrectPa…
NonNodeData @{AzureAD=@{IncorrectPa…=…}} [X] The following nodes are not accepted: AzureAD
@{NonNodeData=@{AzureAD=…}} [X] The following nodes are not accepted: NonNodeDataThe first issue is the actual issue, but the bottom two issues are parents of the top issue. If you resolve the top issue, the bottom two are automatically fixed as well.
There is no specific action needed for fixing the bottom two issues, so that is why I would like to be able to filter those from the output.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request