@@ -28,7 +28,7 @@ namespace Microsoft.OpenApi.Hidi
28
28
{
29
29
public class OpenApiService
30
30
{
31
- public static async Task ProcessOpenApiDocument (
31
+ public static async Task < int > ProcessOpenApiDocument (
32
32
string openapi ,
33
33
string csdl ,
34
34
FileInfo output ,
@@ -174,6 +174,8 @@ CancellationToken cancellationToken
174
174
logger . LogTrace ( $ "Finished serializing in { stopwatch . ElapsedMilliseconds } ms") ;
175
175
176
176
textWriter . Flush ( ) ;
177
+
178
+ return 0 ;
177
179
}
178
180
catch ( Exception ex )
179
181
{
@@ -182,7 +184,7 @@ CancellationToken cancellationToken
182
184
#else
183
185
logger . LogCritical ( ex . Message ) ;
184
186
#endif
185
- return ;
187
+ return 1 ;
186
188
}
187
189
}
188
190
@@ -318,7 +320,7 @@ public static Dictionary<string, List<string>> ParseJsonCollectionFile(Stream st
318
320
return requestUrls ;
319
321
}
320
322
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 )
322
324
{
323
325
var logger = ConfigureLoggerInstance ( loglevel ) ;
324
326
@@ -352,6 +354,8 @@ internal static async Task ValidateOpenApiDocument(string openapi, LogLevel logl
352
354
353
355
logger . LogTrace ( "Finished walking through the OpenApi document. Generating a statistics report.." ) ;
354
356
logger . LogInformation ( statsVisitor . GetStatisticsReport ( ) ) ;
357
+
358
+ return 0 ;
355
359
}
356
360
catch ( Exception ex )
357
361
{
@@ -360,7 +364,7 @@ internal static async Task ValidateOpenApiDocument(string openapi, LogLevel logl
360
364
#else
361
365
logger . LogCritical ( ex . Message ) ;
362
366
#endif
363
- return ;
367
+ return 1 ;
364
368
}
365
369
366
370
}
0 commit comments