Skip to content

Commit 00996c8

Browse files
Refactor service client APIs and remove OpenAPI analyzers
Updated service client methods to use updated APIs, including Azure Queue, Cosmos DB, Event Hubs, and Blob storage. Removed `<IncludeOpenAPIAnalyzers>` from the project file as it is no longer required.
1 parent 664c900 commit 00996c8

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/services/bot/Codebreaker.BotQ/ApplicationServices.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ internal static class ApplicationServices
99
public static void AddApplicationServices(this IHostApplicationBuilder builder)
1010
{
1111

12-
builder.AddAzureQueueClient("botqueue");
12+
builder.AddAzureQueueServiceClient("botqueue");
1313
builder.Services.AddScoped<BotQueueClient>();
1414

1515
var botConfig = builder.Configuration.GetSection("Bot");

src/services/host/Codebreaker.AppHost/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
.AddDatabase("CodebreakerSql");
2121

2222
var cosmos = builder.AddAzureCosmosDB("codebreakercosmos")
23-
.AddDatabase("codebreaker");
23+
.AddCosmosDatabase("codebreaker");
2424

2525
var gameAPIs = builder.AddProject<Projects.Codebreaker_GameAPIs>("gameapis")
2626
.WithExternalHttpEndpoints()
@@ -62,10 +62,10 @@
6262
var blob = storage.AddBlobs("checkpoints");
6363

6464
var eventHub = builder.AddAzureEventHubs("codebreakerevents")
65-
.AddEventHub("games");
65+
.AddHub("games");
6666

6767
var cosmos = builder.AddAzureCosmosDB("codebreakercosmos")
68-
.AddDatabase("codebreaker");
68+
.AddCosmosDatabase("codebreaker");
6969

7070
var gatewayKeyvault = builder.AddAzureKeyVault("gateway-keyvault");
7171
var userServiceKeyvault = builder.AddAzureKeyVault("users-keyvault");

src/services/live/Codebreaker.Live/Codebreaker.Live.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<TargetFramework>net9.0</TargetFramework>
44
<Nullable>enable</Nullable>
55
<ImplicitUsings>enable</ImplicitUsings>
6-
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
76
<UserSecretsId>38af0a0f-4021-416f-bc92-73f548a0a26c</UserSecretsId>
87
</PropertyGroup>
98
<ItemGroup>

src/services/ranking/Codebreaker.Ranking/ApplicationServices.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static void AddApplicationServices(this IHostApplicationBuilder builder)
2222
}
2323
else
2424
{
25-
builder.AddKeyedAzureBlobClient("checkpoints");
25+
builder.AddKeyedAzureBlobServiceClient("checkpoints");
2626

2727
builder.AddAzureEventProcessorClient("codebreakerevents", settings =>
2828
{

0 commit comments

Comments
 (0)