@@ -30,10 +30,10 @@ open Swashbuckle.AspNetCore.SwaggerGen
3030
3131module main =
3232
33- let loadSchemaDocuments ( ) =
33+ let loadSchemaDocuments ( settings : IConfiguration ) =
3434 async {
35- let utilsFileShare = Environment.GetEnvironmentVariable ( " RAFT_UTILS_FILESHARE" )
36- let utilsSas = Environment.GetEnvironmentVariable ( " RAFT_UTILS_SAS" )
35+ let utilsFileShare = settings .[ " RAFT_UTILS_FILESHARE" ]
36+ let utilsSas = settings .[ " RAFT_UTILS_SAS" ]
3737
3838 let directoryClient = Azure.Storage.Files.Shares.ShareDirectoryClient( utilsSas, utilsFileShare, " tools" )
3939
@@ -102,7 +102,7 @@ module main =
102102 interface ISchemaFilter with
103103 member this.Apply ( schema : OpenApiSchema , context : SchemaFilterContext ): unit =
104104 if not ( isNull context.MemberInfo) &&
105- context.MemberInfo.Name = " TaskConfiguration " &&
105+ context.MemberInfo.Name = " ToolConfiguration " &&
106106 context.MemberInfo.DeclaringType.Name = " RaftTask" then
107107
108108 let schemaDocuments = getSchemaDocuments ( Utilities.toolsSchemas) |> Async.RunSynchronously
@@ -149,7 +149,7 @@ module main =
149149 printfn " Initializing central telemetry"
150150 ignore <| Central.Initialize ( TelemetryClient( new TelemetryConfiguration( metricsKey), InstrumentationKey = metricsKey)) siteHash
151151
152- Raft.Utilities.toolsSchemas <- loadSchemaDocuments () |> Async.RunSynchronously
152+ Raft.Utilities.toolsSchemas <- loadSchemaDocuments settings |> Async.RunSynchronously
153153 Raft.Utilities.serviceStartTime <- System.DateTimeOffset.UtcNow
154154 Raft.Utilities.raftStorage <- Raft.Storage.RaftStorage( settings.[ Constants.StorageTableConnectionString])
155155 Raft.Utilities.serviceBusSenders <- Map.empty
0 commit comments