Skip to content

Commit

Permalink
feat: add version header
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Sep 10, 2024
1 parent af8ee00 commit 9e4b5ac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ nuget Be.Vlaanderen.Basisregisters.Build.Pipeline 7.1.0
nuget Be.Vlaanderen.Basisregisters.DockerUtilities 3.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Notifications 21.0.0

nuget Be.Vlaanderen.Basisregisters.AspNetCore.Mvc.Middleware.AddVersionHeader 4.0.0

// Datadog
nuget Datadog.Trace 2.48.0
nuget Datadog.Trace.Bundle 2.48.0
Expand Down
1 change: 1 addition & 0 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ NUGET
Microsoft.Extensions.Logging.Abstractions (>= 2.0)
AWSSDK.SimpleNotificationService (3.7.301.4)
AWSSDK.Core (>= 3.7.302.17 < 4.0)
Be.Vlaanderen.Basisregisters.AspNetCore.Mvc.Middleware.AddVersionHeader (4.0)
Be.Vlaanderen.Basisregisters.Build.Pipeline (7.1)
Be.Vlaanderen.Basisregisters.DockerUtilities (3.0)
Ductus.FluentDocker (>= 2.10.59)
Expand Down
4 changes: 4 additions & 0 deletions src/TicketingService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using Be.Vlaanderen.Basisregisters.AspNetCore.Mvc.Middleware;
using Destructurama;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
Expand All @@ -14,6 +15,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Logging;
using Polly;
using Serilog;
using Serilog.Debugging;
using TicketingService.Abstractions;
Expand Down Expand Up @@ -84,6 +86,8 @@
.UseAuthentication()
.UseAuthorization();

app.UseMiddleware<AddVersionHeaderMiddleware>();

// map endpoints
app.MapPost("/tickets/create", Handlers.Create)
.Produces((int)HttpStatusCode.OK, contentType: MediaTypeNames.Application.Json)
Expand Down
2 changes: 2 additions & 0 deletions src/TicketingService/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ SwashBuckle.AspNetCore.Swagger
SwashBuckle.AspNetCore.SwaggerGen
SwashBuckle.AspNetCore.SwaggerUI

Be.Vlaanderen.Basisregisters.AspNetCore.Mvc.Middleware.AddVersionHeader

Datadog.Trace
Datadog.Trace.Bundle

Expand Down

0 comments on commit 9e4b5ac

Please sign in to comment.