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 1
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
2
// Licensed under the MIT license.
3
3
4
+ using System . IO ;
4
5
using Microsoft . Extensions . Configuration ;
5
6
using Microsoft . OpenApi . OData ;
6
7
@@ -11,15 +12,19 @@ internal static class SettingsUtilities
11
12
internal static IConfiguration GetConfiguration ( string ? settingsFile = null )
12
13
{
13
14
if ( string . IsNullOrEmpty ( settingsFile ) )
15
+ {
14
16
settingsFile = "appsettings.json" ;
17
+ }
18
+
19
+ var settingsFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) , settingsFile ) ;
15
20
16
21
IConfiguration config = new ConfigurationBuilder ( )
17
- . AddJsonFile ( settingsFile , true )
18
- . Build ( ) ;
22
+ . AddJsonFile ( settingsFilePath , true )
23
+ . Build ( ) ;
19
24
20
25
return config ;
21
26
}
22
-
27
+
23
28
internal static OpenApiConvertSettings GetOpenApiConvertSettings ( IConfiguration config , string ? metadataVersion )
24
29
{
25
30
if ( config == null ) { throw new System . ArgumentNullException ( nameof ( config ) ) ; }
You can’t perform that action at this time.
0 commit comments