@@ -19,8 +19,10 @@ internal class TransformCommandHandler : ICommandHandler
1919 public Option < FileInfo > OutputOption { get ; set ; }
2020 public Option < bool > CleanOutputOption { get ; set ; }
2121 public Option < string ? > VersionOption { get ; set ; }
22+ public Option < string ? > MetadataVersionOption { get ; set ; }
2223 public Option < OpenApiFormat ? > FormatOption { get ; set ; }
2324 public Option < bool > TerseOutputOption { get ; set ; }
25+ public Option < string > SettingsFileOption { get ; set ; }
2426 public Option < LogLevel > LogLevelOption { get ; set ; }
2527 public Option < string > FilterByOperationIdsOption { get ; set ; }
2628 public Option < string > FilterByTagsOption { get ; set ; }
@@ -40,21 +42,24 @@ public async Task<int> InvokeAsync(InvocationContext context)
4042 FileInfo output = context . ParseResult . GetValueForOption ( OutputOption ) ;
4143 bool cleanOutput = context . ParseResult . GetValueForOption ( CleanOutputOption ) ;
4244 string ? version = context . ParseResult . GetValueForOption ( VersionOption ) ;
45+ string metadataVersion = context . ParseResult . GetValueForOption ( MetadataVersionOption ) ;
4346 OpenApiFormat ? format = context . ParseResult . GetValueForOption ( FormatOption ) ;
4447 bool terseOutput = context . ParseResult . GetValueForOption ( TerseOutputOption ) ;
48+ string settingsFile = context . ParseResult . GetValueForOption ( SettingsFileOption ) ;
4549 LogLevel logLevel = context . ParseResult . GetValueForOption ( LogLevelOption ) ;
4650 bool inlineLocal = context . ParseResult . GetValueForOption ( InlineLocalOption ) ;
4751 bool inlineExternal = context . ParseResult . GetValueForOption ( InlineExternalOption ) ;
4852 string filterbyoperationids = context . ParseResult . GetValueForOption ( FilterByOperationIdsOption ) ;
4953 string filterbytags = context . ParseResult . GetValueForOption ( FilterByTagsOption ) ;
5054 string filterbycollection = context . ParseResult . GetValueForOption ( FilterByCollectionOption ) ;
55+
5156 CancellationToken cancellationToken = ( CancellationToken ) context . BindingContext . GetService ( typeof ( CancellationToken ) ) ;
5257
5358 using var loggerFactory = Logger . ConfigureLogger ( logLevel ) ;
5459 var logger = loggerFactory . CreateLogger < OpenApiService > ( ) ;
5560 try
5661 {
57- await OpenApiService . TransformOpenApiDocument ( openapi , csdl , csdlFilter , output , cleanOutput , version , format , terseOutput , logLevel , inlineLocal , inlineExternal , filterbyoperationids , filterbytags , filterbycollection , cancellationToken ) ;
62+ await OpenApiService . TransformOpenApiDocument ( openapi , csdl , csdlFilter , output , cleanOutput , version , metadataVersion , format , terseOutput , settingsFile , inlineLocal , inlineExternal , filterbyoperationids , filterbytags , filterbycollection , logger , cancellationToken ) ;
5863
5964 return 0 ;
6065 }
0 commit comments