Skip to content

Commit 463b416

Browse files
benbpsamvaity
authored andcommitted
[azsdk-cli] Change boolean? to boolean for convert swagger/tsp tool (#12050)
1 parent 49810ef commit 463b416

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/TypeSpec/TspConvertTool.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,15 @@ public async Task<TspToolResponse> ConvertSwaggerAsync(
8282
string pathToSwaggerReadme,
8383
[Description("The output directory for the generated TypeSpec project. This must be an existing empty directory.")]
8484
string outputDirectory,
85-
[Description(@"
86-
Indicates whether the swagger is for an Azure Resource Management (ARM) API.
87-
Should be true if the swagger's path contains `resource-manager`.
88-
")
85+
[Description("Indicates whether the swagger is for an Azure Resource Management (ARM) API. " +
86+
"Should be true if the swagger's path contains `resource-manager`.")
8987
]
90-
bool? isAzureResourceManagement,
91-
[Description(@"
92-
Indicates whether the generated TypeSpec project should be fully compatible with the swagger.
93-
It is recommended to set this to `false` so that the generated project leverages TypeSpec built-in libraries with standard patterns and templates.
94-
")
88+
bool isAzureResourceManagement,
89+
[Description("Indicates whether the generated TypeSpec project should be fully compatible with the swagger. " +
90+
"It is recommended to set this to `false` so that the generated project leverages " +
91+
"TypeSpec built-in libraries with standard patterns and templates.")
9592
]
96-
bool? fullyCompatible,
93+
bool fullyCompatible,
9794
bool isCli,
9895
CancellationToken ct
9996
)
@@ -128,7 +125,7 @@ CancellationToken ct
128125
}
129126

130127
var fullOutputDir = Path.GetFullPath(outputDirectory.Trim());
131-
return await tspClientHelper.ConvertSwaggerAsync(fullPathToSwaggerReadme, fullOutputDir, isAzureResourceManagement ?? false, fullyCompatible ?? false, isCli, ct);
128+
return await tspClientHelper.ConvertSwaggerAsync(fullPathToSwaggerReadme, fullOutputDir, isAzureResourceManagement, fullyCompatible, isCli, ct);
132129
}
133130
catch (Exception ex)
134131
{

0 commit comments

Comments
 (0)