File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/Microsoft.OpenApi.Hidi/Utilities Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license.
33
4+ using System . IO ;
45using Microsoft . Extensions . Configuration ;
56using Microsoft . OpenApi . OData ;
67
@@ -11,15 +12,19 @@ internal static class SettingsUtilities
1112 internal static IConfiguration GetConfiguration ( string ? settingsFile = null )
1213 {
1314 if ( string . IsNullOrEmpty ( settingsFile ) )
15+ {
1416 settingsFile = "appsettings.json" ;
17+ }
18+
19+ var settingsFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) , settingsFile ) ;
1520
1621 IConfiguration config = new ConfigurationBuilder ( )
17- . AddJsonFile ( settingsFile , true )
18- . Build ( ) ;
22+ . AddJsonFile ( settingsFilePath , true )
23+ . Build ( ) ;
1924
2025 return config ;
2126 }
22-
27+
2328 internal static OpenApiConvertSettings GetOpenApiConvertSettings ( IConfiguration config , string ? metadataVersion )
2429 {
2530 if ( config == null ) { throw new System . ArgumentNullException ( nameof ( config ) ) ; }
You can’t perform that action at this time.
0 commit comments