Skip to content

Commit 688de2f

Browse files
authored
Merge pull request #188 from dataplat/issue-43
Update New-FabricReport parameters for clarity #43
2 parents 8d31359 + e184f3d commit 688de2f

5 files changed

Lines changed: 8 additions & 9 deletions

File tree

docs/en-US/New-FabricReport.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Creates a new Report in a specified Microsoft Fabric workspace.
2121

2222
```
2323
New-FabricReport [-WorkspaceId] <guid> [-ReportName] <string> [[-ReportDescription] <string>]
24-
[-ReportPathDefinition] <string> [-WhatIf] [-Confirm] [<CommonParameters>]
24+
[[-ReportPathDefinition] <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
2525
```
2626

2727
## ALIASES
@@ -111,7 +111,7 @@ HelpMessage: ''
111111
112112
### -ReportPathDefinition
113113
114-
A mandatory path to the folder that contains Report definition files to upload.
114+
An optional path to the folder that contains Report definition files to upload.
115115
116116
```yaml
117117
Type: System.String
@@ -121,7 +121,7 @@ Aliases: []
121121
ParameterSets:
122122
- Name: (All)
123123
Position: 3
124-
IsRequired: true
124+
IsRequired: false
125125
ValueFromPipeline: false
126126
ValueFromPipelineByPropertyName: false
127127
ValueFromRemainingArguments: false
@@ -195,4 +195,3 @@ Author: Tiago Balabuch
195195
## RELATED LINKS
196196

197197
{{ Fill in the related links here }}
198-

helper/build-and-test.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Remove-Module -Name FabricTools -ErrorAction SilentlyContinue
1515
ipmo .\output\module\FabricTools\0.0.1\FabricTools.psd1
1616
Get-Module Fab*
1717

18-
Invoke-ScriptAnalyzer -Path .\source\Public\**
18+
# Invoke-ScriptAnalyzer -Path .\source\Public\**
1919

2020

2121
$tests = Invoke-Pester .\tests\ -PassThru

source/Private/Test-FabricApiResponse.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function Test-FabricApiResponse {
168168

169169
# Try to get Name of Id from the response when new item is created
170170
if ($Operation -eq 'New' -and -not $ObjectIdOrName) {
171-
$ObjectIdOrName = $Response.DisplayName ? $Response.DisplayName : $Response.id
171+
$ObjectIdOrName = if ($Response.DisplayName) { $Response.DisplayName } else { $Response.id }
172172
}
173173
switch ($Operation) {
174174
'New' { $msg = "$TypeName '$ObjectIdOrName' created successfully."; $level = 'Info' }

source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineStage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Author: Kamil Nowinski
7070
HandleResponse = $true
7171
ExtractValue = $true
7272
TypeName = "deployment pipeline stage"
73-
ObjectIdOrName = $StageId ? $StageId : $DeploymentPipelineId
73+
ObjectIdOrName = if ($StageId) { $StageId } else { $DeploymentPipelineId }
7474
}
7575
$response = Invoke-FabricRestMethod @apiParameters
7676

source/Public/Report/New-FabricReport.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function New-FabricReport
1818
An optional description for the Report.
1919
2020
.PARAMETER ReportPathDefinition
21-
A mandatory path to the folder that contains Report definition files to upload.
21+
An optional path to the folder that contains Report definition files to upload.
2222
2323
2424
.EXAMPLE
@@ -49,7 +49,7 @@ function New-FabricReport
4949
[ValidateNotNullOrEmpty()]
5050
[string]$ReportDescription,
5151

52-
[Parameter(Mandatory = $true)]
52+
[Parameter(Mandatory = $false)]
5353
[ValidateNotNullOrEmpty()]
5454
[string]$ReportPathDefinition
5555
)

0 commit comments

Comments
 (0)