Skip to content

Commit

Permalink
Merge branch 'main' into fix/high-reportee-count-performance-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
elsand authored Dec 11, 2024
2 parents c180167 + f9c2c9d commit 01b0436
Show file tree
Hide file tree
Showing 10 changed files with 2,546 additions and 2,527 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include:

services:
dialogporten-webapi-ingress:
image: nginx:1.27.2
image: nginx:1.27.3
ports:
- "7214:80"
volumes:
Expand Down Expand Up @@ -38,7 +38,7 @@ services:
- ./.aspnet/https:/https

dialogporten-graphql-ingress:
image: nginx:1.27.2
image: nginx:1.27.3
ports:
- "7215:80"
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/V1/swagger.verified.json
Original file line number Diff line number Diff line change
Expand Up @@ -4683,7 +4683,7 @@
"JWTBearerAuth": {
"bearerFormat": "JWT",
"description": "Enter a JWT token to authorize the requests...",
"scheme": "Bearer",
"scheme": "bearer",
"type": "http"
}
}
Expand Down
18 changes: 18 additions & 0 deletions src/Digdir.Domain.Dialogporten.WebApi/OpenApiDocumentExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ namespace Digdir.Domain.Dialogporten.WebApi;

public static class OpenApiDocumentExtensions
{
/// <summary>
/// To have this be validated in BlackDuck, we need to lower case the bearer scheme name.
/// From editor.swagger.io:
/// Structural error at components.securitySchemes.JWTBearerAuth
/// should NOT have a `bearerFormat` property without `scheme: bearer` being set
/// </summary>
/// <param name="openApiDocument"></param>
public static void FixJwtBearerCasing(this OpenApiDocument openApiDocument)
{
foreach (var securityScheme in openApiDocument.Components.SecuritySchemes.Values)
{
if (securityScheme.Scheme.Equals("Bearer", StringComparison.Ordinal))
{
securityScheme.Scheme = "bearer";
}
}
}

/// <summary>
/// When generating ProblemDetails and ProblemDetails_Error, there is a bug/weird behavior in NSwag or FastEndpoints
/// which results in certain 'Description' properties being generated when running on f.ex. MacOS,
Expand Down
1 change: 1 addition & 0 deletions src/Digdir.Domain.Dialogporten.WebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ static void BuildAndRun(string[] args, TelemetryConfiguration telemetryConfigura
document.Generator = null;
document.ReplaceProblemDetailsDescriptions();
document.MakeCollectionsNullable();
document.FixJwtBearerCasing();
};
}, uiConfig =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0"/>
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0"/>
<PackageReference Include="NSec.Cryptography" Version="24.4.0"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.1" />
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
<PackageReference Include="System.Formats.Asn1" Version="9.0.0" />
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="NSubstitute" Version="5.3.0"/>
<PackageReference Include="Respawn" Version="6.2.1"/>
<PackageReference Include="Testcontainers.PostgreSql" Version="4.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Verify.Xunit" Version="28.4.0" />
<PackageReference Include="NSubstitute" Version="5.3.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2"/>
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Medo.Uuid7" Version="2.1.1" />
<PackageReference Include="Microsoft.Build" Version="17.12.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
Expand Down
5,038 changes: 2,519 additions & 2,519 deletions tests/k6/tests/performancetest_data/endusers-yt01.csv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/k6/tests/serviceowner/performance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This performance test directory focuses on evaluating the GET and POST endpoints

### Prerequisites
Before running the performance test, make sure you have met the following prerequisites:
- [K6 prerequisites](../../README.md#Prerequisites)
- [K6 prerequisites](../../../README.md#Prerequisites)

### Test Files
The test files associated with this performance test are
Expand Down

0 comments on commit 01b0436

Please sign in to comment.