30 lines
1.0 KiB
PowerShell
30 lines
1.0 KiB
PowerShell
function Test-AlkamiLegacyUtilityManifest10 {
|
|
<#
|
|
.SYNOPSIS
|
|
Please don't use this file by hand, please use Test-AlkamiManifest
|
|
This function is intended to validate the LegacyUtilityManifest dotted object/hashtable so we can ensure that the values provided meet a minimum standard of valid
|
|
|
|
.PARAMETER LegacyUtilityManifest
|
|
A dotted object ([xml](Get-Content -Path $somePath)) or hashtable of values
|
|
#>
|
|
[CmdletBinding()]
|
|
[OutputType([System.Collections.Hashtable])]
|
|
Param(
|
|
[Parameter(Position = 0, Mandatory = $true)]
|
|
[ValidateNotNullOrEmpty()]
|
|
[object]$LegacyUtilityManifest
|
|
)
|
|
|
|
$success = $true
|
|
$resultMessages = @()
|
|
|
|
if (-not [string]::IsNullOrWhiteSpace($LegacyUtilityManifest.needsShared) -and -not (@('true','false') -contains $LegacyUtilityManifest.needsShared)) {
|
|
$resultMessages += "packageManifest/legacyUtilityManifest/needsShared must be true or false"
|
|
$success = $false
|
|
}
|
|
|
|
return @{
|
|
success = $success
|
|
results = $resultMessages
|
|
}
|
|
} |