@@ -41,7 +41,7 @@ internal static class OpenApiService
4141 /// <summary>
4242 /// Implementation of the transform command
4343 /// </summary>
44- public static async Task TransformOpenApiDocument ( HidiOptions options , ILogger logger , CancellationToken cancellationToken )
44+ public static async Task TransformOpenApiDocument ( HidiOptions options , ILogger logger , CancellationToken cancellationToken = default )
4545 {
4646 if ( string . IsNullOrEmpty ( options . OpenApi ) && string . IsNullOrEmpty ( options . Csdl ) && string . IsNullOrEmpty ( options . FilterOptions ? . FilterByApiManifest ) )
4747 {
@@ -116,7 +116,7 @@ public static async Task TransformOpenApiDocument(HidiOptions options, ILogger l
116116 }
117117 }
118118
119- private static async Task < ApiDependency ? > FindApiDependency ( string ? apiManifestPath , ILogger logger , CancellationToken cancellationToken )
119+ private static async Task < ApiDependency ? > FindApiDependency ( string ? apiManifestPath , ILogger logger , CancellationToken cancellationToken = default )
120120 {
121121 ApiDependency ? apiDependency = null ;
122122 // If API Manifest is provided, load it, use it get the OpenAPI path
@@ -326,7 +326,7 @@ private static Stream ApplyFilterToCsdl(Stream csdlStream, string entitySetOrSin
326326 public static async Task ValidateOpenApiDocument (
327327 string openApi ,
328328 ILogger logger ,
329- CancellationToken cancellationToken )
329+ CancellationToken cancellationToken = default )
330330 {
331331 if ( string . IsNullOrEmpty ( openApi ) )
332332 {
@@ -361,7 +361,7 @@ public static async Task ValidateOpenApiDocument(
361361 }
362362 }
363363
364- private static async Task < ReadResult > ParseOpenApi ( string openApiFile , bool inlineExternal , ILogger logger , Stream stream , CancellationToken cancellationToken )
364+ private static async Task < ReadResult > ParseOpenApi ( string openApiFile , bool inlineExternal , ILogger logger , Stream stream , CancellationToken cancellationToken = default )
365365 {
366366 ReadResult result ;
367367 Stopwatch stopwatch = Stopwatch . StartNew ( ) ;
@@ -480,7 +480,7 @@ private static Dictionary<string, List<string>> EnumerateJsonDocument(JsonElemen
480480 /// <summary>
481481 /// Reads stream from file system or makes HTTP request depending on the input string
482482 /// </summary>
483- private static async Task < Stream > GetStream ( string input , ILogger logger , CancellationToken cancellationToken )
483+ private static async Task < Stream > GetStream ( string input , ILogger logger , CancellationToken cancellationToken = default )
484484 {
485485 Stream stream ;
486486 using ( logger . BeginScope ( "Reading input stream" ) )
@@ -556,7 +556,7 @@ private static string GetInputPathExtension(string? openapi = null, string? csdl
556556 return extension ;
557557 }
558558
559- internal static async Task < string ? > ShowOpenApiDocument ( HidiOptions options , ILogger logger , CancellationToken cancellationToken )
559+ internal static async Task < string ? > ShowOpenApiDocument ( HidiOptions options , ILogger logger , CancellationToken cancellationToken = default )
560560 {
561561 try
562562 {
@@ -709,7 +709,7 @@ internal static void WriteTreeDocumentAsHtml(string sourceUrl, OpenApiDocument d
709709 writer . WriteLine ( "</html" ) ;
710710 }
711711
712- internal static async Task PluginManifest ( HidiOptions options , ILogger logger , CancellationToken cancellationToken )
712+ internal static async Task PluginManifest ( HidiOptions options , ILogger logger , CancellationToken cancellationToken = default )
713713 {
714714 // If ApiManifest is provided, set the referenced OpenAPI document
715715 var apiDependency = await FindApiDependency ( options . FilterOptions ? . FilterByApiManifest , logger , cancellationToken ) . ConfigureAwait ( false ) ;
0 commit comments