35 lines
1.1 KiB
PowerShell
35 lines
1.1 KiB
PowerShell
function Test-AlkamiWebsiteManifest10 {
|
|
<#
|
|
.SYNOPSIS
|
|
Please don't use this file by hand, please use Test-AlkamiManifest
|
|
This function is intended to validate the WebsiteManifest dotted object/hashtable so we can ensure that the values provided meet a minimum standard of valid
|
|
|
|
.PARAMETER WebsiteManifest
|
|
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]$WebsiteManifest
|
|
)
|
|
|
|
$success = $true
|
|
$resultMessages = @()
|
|
|
|
if ([string]::IsNullOrWhiteSpace($WebsiteManifest.websiteName)) {
|
|
$resultMessages += "packageManifest/websiteManifest/websiteName can not be empty"
|
|
$success = $false
|
|
}
|
|
|
|
if ([string]::IsNullOrWhiteSpace($WebsiteManifest.url)) {
|
|
$resultMessages += "packageManifest/websiteManifest/url can not be empty"
|
|
$success = $false
|
|
}
|
|
|
|
return @{
|
|
success = $success
|
|
results = $resultMessages
|
|
}
|
|
} |