Skip to content

Commit f95508c

Browse files
authored
[azsdk-cli] Change boolean? to boolean for convert swagger/tsp tool (#12050)
1 parent 3279670 commit f95508c

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
@@ -80,18 +80,15 @@ public async Task<TspToolResponse> ConvertSwaggerAsync(
8080
string pathToSwaggerReadme,
8181
[Description("The output directory for the generated TypeSpec project. This must be an existing empty directory.")]
8282
string outputDirectory,
83-
[Description(@"
84-
Indicates whether the swagger is for an Azure Resource Management (ARM) API.
85-
Should be true if the swagger's path contains `resource-manager`.
86-
")
83+
[Description("Indicates whether the swagger is for an Azure Resource Management (ARM) API. " +
84+
"Should be true if the swagger's path contains `resource-manager`.")
8785
]
88-
bool? isAzureResourceManagement,
89-
[Description(@"
90-
Indicates whether the generated TypeSpec project should be fully compatible with the swagger.
91-
It is recommended to set this to `false` so that the generated project leverages TypeSpec built-in libraries with standard patterns and templates.
92-
")
86+
bool isAzureResourceManagement,
87+
[Description("Indicates whether the generated TypeSpec project should be fully compatible with the swagger. " +
88+
"It is recommended to set this to `false` so that the generated project leverages " +
89+
"TypeSpec built-in libraries with standard patterns and templates.")
9390
]
94-
bool? fullyCompatible,
91+
bool fullyCompatible,
9592
bool isCli,
9693
CancellationToken ct
9794
)
@@ -126,7 +123,7 @@ CancellationToken ct
126123
}
127124

128125
var fullOutputDir = Path.GetFullPath(outputDirectory.Trim());
129-
return await RunTspClientAsync(fullPathToSwaggerReadme, fullOutputDir, isAzureResourceManagement ?? false, fullyCompatible ?? false, isCli, ct);
126+
return await RunTspClientAsync(fullPathToSwaggerReadme, fullOutputDir, isAzureResourceManagement, fullyCompatible, isCli, ct);
130127
}
131128
catch (Exception ex)
132129
{

0 commit comments

Comments
 (0)