@@ -28,7 +28,7 @@ namespace Microsoft.OpenApi.Hidi
2828{
2929 public class OpenApiService
3030 {
31- public static async Task ProcessOpenApiDocument (
31+ public static async Task < int > ProcessOpenApiDocument (
3232 string openapi ,
3333 string csdl ,
3434 FileInfo output ,
@@ -174,6 +174,8 @@ CancellationToken cancellationToken
174174 logger . LogTrace ( $ "Finished serializing in { stopwatch . ElapsedMilliseconds } ms") ;
175175
176176 textWriter . Flush ( ) ;
177+
178+ return 0 ;
177179 }
178180 catch ( Exception ex )
179181 {
@@ -182,7 +184,7 @@ CancellationToken cancellationToken
182184#else
183185 logger . LogCritical ( ex . Message ) ;
184186#endif
185- return ;
187+ return 1 ;
186188 }
187189 }
188190
@@ -318,7 +320,7 @@ public static Dictionary<string, List<string>> ParseJsonCollectionFile(Stream st
318320 return requestUrls ;
319321 }
320322
321- internal static async Task ValidateOpenApiDocument ( string openapi , LogLevel loglevel , CancellationToken cancellationToken )
323+ internal static async Task < int > ValidateOpenApiDocument ( string openapi , LogLevel loglevel , CancellationToken cancellationToken )
322324 {
323325 var logger = ConfigureLoggerInstance ( loglevel ) ;
324326
@@ -352,6 +354,8 @@ internal static async Task ValidateOpenApiDocument(string openapi, LogLevel logl
352354
353355 logger . LogTrace ( "Finished walking through the OpenApi document. Generating a statistics report.." ) ;
354356 logger . LogInformation ( statsVisitor . GetStatisticsReport ( ) ) ;
357+
358+ return 0 ;
355359 }
356360 catch ( Exception ex )
357361 {
@@ -360,7 +364,7 @@ internal static async Task ValidateOpenApiDocument(string openapi, LogLevel logl
360364#else
361365 logger . LogCritical ( ex . Message ) ;
362366#endif
363- return ;
367+ return 1 ;
364368 }
365369
366370 }
0 commit comments