diff --git a/src/Services/Scheduling/Api/ConfigureServices.cs b/src/Services/Scheduling/Api/ConfigureServices.cs index 6b78ccba..7a72dc1a 100644 --- a/src/Services/Scheduling/Api/ConfigureServices.cs +++ b/src/Services/Scheduling/Api/ConfigureServices.cs @@ -2,6 +2,7 @@ using KDVManager.Services.Scheduling.Application.Contracts.Services; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Any; namespace Microsoft.Extensions.DependencyInjection; @@ -26,6 +27,14 @@ public static IServiceCollection AddApiServices(this IServiceCollection services Email = "admin@kdvmanager.nl", }, }); + + // Add a custom schema filter to handle TimeSpan as string with time format + options.MapType(() => new OpenApiSchema + { + Type = "string", + Format = "time", + Example = new OpenApiString("14:30:00") + }); }); services.AddHealthChecks();