diff --git a/docs/en-US/New-FabricReport.md b/docs/en-US/New-FabricReport.md index ed153504..e24b5680 100644 --- a/docs/en-US/New-FabricReport.md +++ b/docs/en-US/New-FabricReport.md @@ -21,7 +21,7 @@ Creates a new Report in a specified Microsoft Fabric workspace. ``` New-FabricReport [-WorkspaceId] [-ReportName] [[-ReportDescription] ] - [-ReportPathDefinition] [-WhatIf] [-Confirm] [] + [[-ReportPathDefinition] ] [-WhatIf] [-Confirm] [] ``` ## ALIASES @@ -111,7 +111,7 @@ HelpMessage: '' ### -ReportPathDefinition -A mandatory path to the folder that contains Report definition files to upload. +An optional path to the folder that contains Report definition files to upload. ```yaml Type: System.String @@ -121,7 +121,7 @@ Aliases: [] ParameterSets: - Name: (All) Position: 3 - IsRequired: true + IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false @@ -195,4 +195,3 @@ Author: Tiago Balabuch ## RELATED LINKS {{ Fill in the related links here }} - diff --git a/helper/build-and-test.ps1 b/helper/build-and-test.ps1 index 5ef00a52..b061d200 100644 --- a/helper/build-and-test.ps1 +++ b/helper/build-and-test.ps1 @@ -15,7 +15,7 @@ Remove-Module -Name FabricTools -ErrorAction SilentlyContinue ipmo .\output\module\FabricTools\0.0.1\FabricTools.psd1 Get-Module Fab* -Invoke-ScriptAnalyzer -Path .\source\Public\** +# Invoke-ScriptAnalyzer -Path .\source\Public\** $tests = Invoke-Pester .\tests\ -PassThru diff --git a/source/Private/Test-FabricApiResponse.ps1 b/source/Private/Test-FabricApiResponse.ps1 index c4149c45..6d1db349 100644 --- a/source/Private/Test-FabricApiResponse.ps1 +++ b/source/Private/Test-FabricApiResponse.ps1 @@ -168,7 +168,7 @@ function Test-FabricApiResponse { # Try to get Name of Id from the response when new item is created if ($Operation -eq 'New' -and -not $ObjectIdOrName) { - $ObjectIdOrName = $Response.DisplayName ? $Response.DisplayName : $Response.id + $ObjectIdOrName = if ($Response.DisplayName) { $Response.DisplayName } else { $Response.id } } switch ($Operation) { 'New' { $msg = "$TypeName '$ObjectIdOrName' created successfully."; $level = 'Info' } diff --git a/source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineStage.ps1 b/source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineStage.ps1 index 3a60c22d..b8021811 100644 --- a/source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineStage.ps1 +++ b/source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineStage.ps1 @@ -70,7 +70,7 @@ Author: Kamil Nowinski HandleResponse = $true ExtractValue = $true TypeName = "deployment pipeline stage" - ObjectIdOrName = $StageId ? $StageId : $DeploymentPipelineId + ObjectIdOrName = if ($StageId) { $StageId } else { $DeploymentPipelineId } } $response = Invoke-FabricRestMethod @apiParameters diff --git a/source/Public/Report/New-FabricReport.ps1 b/source/Public/Report/New-FabricReport.ps1 index 46836432..3f7390a7 100644 --- a/source/Public/Report/New-FabricReport.ps1 +++ b/source/Public/Report/New-FabricReport.ps1 @@ -18,7 +18,7 @@ function New-FabricReport An optional description for the Report. .PARAMETER ReportPathDefinition - A mandatory path to the folder that contains Report definition files to upload. + An optional path to the folder that contains Report definition files to upload. .EXAMPLE @@ -49,7 +49,7 @@ function New-FabricReport [ValidateNotNullOrEmpty()] [string]$ReportDescription, - [Parameter(Mandatory = $true)] + [Parameter(Mandatory = $false)] [ValidateNotNullOrEmpty()] [string]$ReportPathDefinition )