Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MxIO.ApiClient.WebExtensions, MxIO.ApiClient.Abstractions and Microsoft.Extensions.Logging.Abstractions in /src #428

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/repository-webapi/repository-webapi.csproj
Original file line number Diff line number Diff line change
@@ -21,8 +21,8 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.10" />
<PackageReference Include="Microsoft.Identity.Web" Version="3.2.2" />
<PackageReference Include="MxIO.ApiClient.Abstractions" Version="1.1.100.1" />
<PackageReference Include="MxIO.ApiClient.WebExtensions" Version="1.1.100.1" />
<PackageReference Include="MxIO.ApiClient.Abstractions" Version="1.1.101.1" />
<PackageReference Include="MxIO.ApiClient.WebExtensions" Version="1.1.101.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.8.1" />
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />

Unchanged files with check annotations Beta

public class MapPackDto : IDto
{
public MapPackDto(Guid mapPackId, Guid gameServerId, string title, string description, string gameMode, bool syncToGameServer, bool syncCompleted, bool deleted, List<MapPackMapDto> mapPackMaps)

Check warning on line 8 in src/repository-webapi-abstractions/Models/MapPacks/MapPackDto.cs

GitHub Actions / code-scanning

Constructor has 9 parameters, which is greater than the 7 authorized. (https://rules.sonarsource.com/csharp/RSPEC-107)
{
MapPackId = mapPackId;
GameServerId = gameServerId;
public async Task<ApiResponseDto<UserProfileCollectionDto>> GetUserProfiles(string? filterString, int skipEntries, int takeEntries, UserProfilesOrder? order)
{
var request = await CreateRequest("user-profile", Method.Get);

Check warning on line 56 in src/repository-webapi-client/Api/UserProfileApi.cs

GitHub Actions / code-scanning

Define a constant instead of using this literal 'user-profile' 5 times. (https://rules.sonarsource.com/csharp/RSPEC-1192)
if (!string.IsNullOrWhiteSpace(filterString))
request.AddQueryParameter("filterString", filterString.ToString());
{
public class RepositoryApiClient : IRepositoryApiClient
{
public RepositoryApiClient(

Check warning on line 7 in src/repository-webapi-client/RepositoryApiClient.cs

GitHub Actions / code-scanning

Constructor has 18 parameters, which is greater than the 7 authorized. (https://rules.sonarsource.com/csharp/RSPEC-107)
IAdminActionsApi adminActionsApiClient,
IBanFileMonitorsApi banFileMonitorsApiClient,
IChatMessagesApi chatMessagesApiClient,
public class MapPacksApi : BaseApi, IMapPacksApi
{
public MapPacksApi(ILogger<MapsApi> logger, IApiTokenProvider apiTokenProvider, IMemoryCache memoryCache, IOptions<RepositoryApiClientOptions> options, IRestClientSingleton restClientSingleton) : base(logger, apiTokenProvider, restClientSingleton, options)

Check warning on line 17 in src/repository-webapi-client/Api/MapPacksApi.cs

GitHub Actions / code-scanning

Update this logger to use its enclosing type. (https://rules.sonarsource.com/csharp/RSPEC-6672)
{
}
if (demo == null)
return new ApiResponseDto(HttpStatusCode.NotFound);
var blobServiceClient = new BlobServiceClient(new Uri(configuration["appdata_storage_blob_endpoint"]), new DefaultAzureCredential());

Check warning on line 183 in src/repository-webapi/Controllers/DemosController.cs

GitHub Actions / code-scanning

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 183 in src/repository-webapi/Controllers/DemosController.cs

GitHub Actions / dotnet-web-ci

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 183 in src/repository-webapi/Controllers/DemosController.cs

GitHub Actions / dotnet-web-ci

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 183 in src/repository-webapi/Controllers/DemosController.cs

GitHub Actions / dotnet-web-ci

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 183 in src/repository-webapi/Controllers/DemosController.cs

GitHub Actions / run-api-integration-tests-dev

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 183 in src/repository-webapi/Controllers/DemosController.cs

GitHub Actions / run-api-integration-tests-dev

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.
var containerClient = blobServiceClient.GetBlobContainerClient("demos");
var blobKey = $"{Guid.NewGuid()}.{demo.GameType.ToGameType().DemoExtension()}";
async Task<ApiResponseDto<GameTrackerBannerDto>> IGameTrackerBannerApi.GetGameTrackerBanner(string ipAddress, string queryPort, string imageName)
{
var blobServiceClient = new BlobServiceClient(new Uri(configuration["appdata_storage_blob_endpoint"]), new DefaultAzureCredential());

Check warning on line 41 in src/repository-webapi/Controllers/GameTrackerBannerController.cs

GitHub Actions / code-scanning

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 41 in src/repository-webapi/Controllers/GameTrackerBannerController.cs

GitHub Actions / dotnet-web-ci

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 41 in src/repository-webapi/Controllers/GameTrackerBannerController.cs

GitHub Actions / dotnet-web-ci

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 41 in src/repository-webapi/Controllers/GameTrackerBannerController.cs

GitHub Actions / dotnet-web-ci

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 41 in src/repository-webapi/Controllers/GameTrackerBannerController.cs

GitHub Actions / run-api-integration-tests-dev

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 41 in src/repository-webapi/Controllers/GameTrackerBannerController.cs

GitHub Actions / run-api-integration-tests-dev

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.
var containerClient = blobServiceClient.GetBlobContainerClient("gametracker");
var blobKey = $"{ipAddress}_{queryPort}_{imageName}";
if (map == null)
return new ApiResponseDto(HttpStatusCode.NotFound);
var blobServiceClient = new BlobServiceClient(new Uri(Environment.GetEnvironmentVariable("appdata_storage_blob_endpoint")), new DefaultAzureCredential());

Check warning on line 363 in src/repository-webapi/Controllers/MapsController.cs

GitHub Actions / code-scanning

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 363 in src/repository-webapi/Controllers/MapsController.cs

GitHub Actions / dotnet-web-ci

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 363 in src/repository-webapi/Controllers/MapsController.cs

GitHub Actions / dotnet-web-ci

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 363 in src/repository-webapi/Controllers/MapsController.cs

GitHub Actions / dotnet-web-ci

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 363 in src/repository-webapi/Controllers/MapsController.cs

GitHub Actions / run-api-integration-tests-dev

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.

Check warning on line 363 in src/repository-webapi/Controllers/MapsController.cs

GitHub Actions / run-api-integration-tests-dev

Possible null reference argument for parameter 'uriString' in 'Uri.Uri(string uriString)'.
var containerClient = blobServiceClient.GetBlobContainerClient("map-images");
var blobKey = $"{map.GameType.ToGameType()}_{map.MapName}.jpg";
var gameServer = await Context.GameServers.SingleOrDefaultAsync(gs => gs.GameServerId.ToString() == gameServerId);
if (gameServer == null) return new BadRequestResult();
var keyVaultEndpoint = _configuration["gameservers-keyvault-endpoint"] ?? throw new ArgumentNullException("gameservers-keyvault-endpoint");

Check warning on line 36 in src/repository-webapi/Controllers/GameServersSecretsController.cs

GitHub Actions / code-scanning

Define a constant instead of using this literal 'gameservers-keyvault-endpoint' 4 times. (https://rules.sonarsource.com/csharp/RSPEC-1192)
var secretClient = new SecretClient(new Uri(keyVaultEndpoint), new DefaultAzureCredential());
try
}
catch
{
return new ApiResponseDto(HttpStatusCode.BadRequest, "Could not deserialize request body").ToHttpResult();

Check warning on line 186 in src/repository-webapi/Controllers/UserProfileController.cs

GitHub Actions / code-scanning

Define a constant instead of using this literal 'Could not deserialize request body' 4 times. (https://rules.sonarsource.com/csharp/RSPEC-1192)
}
if (createUserProfileDto == null || !createUserProfileDto.Any())
case GameType.CallOfDuty5:
return "dm_6";
default:
throw new ApplicationException("Game Type not supported for demos");

Check warning on line 45 in src/repository-webapi/Extensions/GameTypeExtensions.cs

GitHub Actions / code-scanning

'System.ApplicationException' should not be thrown by user code. (https://rules.sonarsource.com/csharp/RSPEC-112)
}
}
}