Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

Commit 0f9e0c0

Browse files
authored
Fix integration point for tool swagger. #96 (#97)
1 parent d549b12 commit 0f9e0c0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/APIService/ApiService/Program.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ open Swashbuckle.AspNetCore.SwaggerGen
3030

3131
module 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

Comments
 (0)