From 955db0e4d612eb911ef74233eb693908b53ab79f Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Tue, 25 Nov 2025 16:13:32 +0100 Subject: [PATCH 01/16] build: .NET 10 upgrade --- Dockerfile | 4 ++-- Px.Abstractions/Px.Abstractions.csproj | 2 +- Px.Search.Lucene/Px.Search.Lucene.csproj | 4 ++-- Px.Search/Px.Search.csproj | 16 ++++++++-------- PxWeb.UnitTests/PxWeb.UnitTests.csproj | 8 ++++---- PxWeb/PxWeb.csproj | 16 +++++----------- PxWebApi.BigTests/PxWebApi.BigTests.csproj | 8 ++++---- PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj | 12 +++++------- global.json | 2 +- 9 files changed, 32 insertions(+), 40 deletions(-) diff --git a/Dockerfile b/Dockerfile index 57f9c0e9..98ff4761 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0.415-alpine3.22 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.100-alpine3.22 AS build ARG TARGETARCH WORKDIR /source @@ -15,7 +15,7 @@ RUN \ # Enable globalization and time zones: # https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md # final stage/image -FROM mcr.microsoft.com/dotnet/aspnet:8.0.21-alpine3.22 +FROM mcr.microsoft.com/dotnet/aspnet:10.0.0-alpine3.22 EXPOSE 8080 ENV \ diff --git a/Px.Abstractions/Px.Abstractions.csproj b/Px.Abstractions/Px.Abstractions.csproj index c87b7209..24b90e25 100644 --- a/Px.Abstractions/Px.Abstractions.csproj +++ b/Px.Abstractions/Px.Abstractions.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable diff --git a/Px.Search.Lucene/Px.Search.Lucene.csproj b/Px.Search.Lucene/Px.Search.Lucene.csproj index c3c6b6e4..185f4083 100644 --- a/Px.Search.Lucene/Px.Search.Lucene.csproj +++ b/Px.Search.Lucene/Px.Search.Lucene.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 enable enable @@ -18,7 +18,7 @@ - + diff --git a/Px.Search/Px.Search.csproj b/Px.Search/Px.Search.csproj index 8d7a7874..9d9df1be 100644 --- a/Px.Search/Px.Search.csproj +++ b/Px.Search/Px.Search.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable @@ -15,18 +15,18 @@ - + - - - - <_Parameter1>Px.Search.Tests - - + + + + <_Parameter1>Px.Search.Tests + + diff --git a/PxWeb.UnitTests/PxWeb.UnitTests.csproj b/PxWeb.UnitTests/PxWeb.UnitTests.csproj index 0d15ca65..4bfaf47d 100644 --- a/PxWeb.UnitTests/PxWeb.UnitTests.csproj +++ b/PxWeb.UnitTests/PxWeb.UnitTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable false @@ -17,10 +17,10 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index eb98a945..feabe1d5 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -1,14 +1,14 @@ - net8.0 + net10.0 enable disabled false - True + False @@ -42,9 +42,7 @@ - - @@ -55,13 +53,9 @@ - - - - - - - + + + diff --git a/PxWebApi.BigTests/PxWebApi.BigTests.csproj b/PxWebApi.BigTests/PxWebApi.BigTests.csproj index 11da47b1..e8573742 100644 --- a/PxWebApi.BigTests/PxWebApi.BigTests.csproj +++ b/PxWebApi.BigTests/PxWebApi.BigTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable true false @@ -23,10 +23,10 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj index 9e91d156..84e4fc3d 100644 --- a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj +++ b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable @@ -19,12 +19,10 @@ - - - - - - + + + + diff --git a/global.json b/global.json index 391ba3c2..512142d2 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "10.0.100", "rollForward": "latestFeature" } } From 0d7113de92e8af0eac382cf16cc3a53139d9ce8f Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Thu, 9 Apr 2026 14:35:18 +0200 Subject: [PATCH 02/16] Update dependencies --- Px.Search.Lucene/Px.Search.Lucene.csproj | 2 +- Px.Search/Px.Search.csproj | 2 +- PxWeb.UnitTests/PxWeb.UnitTests.csproj | 6 +++--- PxWeb/PxWeb.csproj | 8 ++------ PxWebApi.BigTests/PxWebApi.BigTests.csproj | 6 +++--- PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj | 12 ++++++------ 6 files changed, 16 insertions(+), 20 deletions(-) diff --git a/Px.Search.Lucene/Px.Search.Lucene.csproj b/Px.Search.Lucene/Px.Search.Lucene.csproj index 185f4083..0d7867a0 100644 --- a/Px.Search.Lucene/Px.Search.Lucene.csproj +++ b/Px.Search.Lucene/Px.Search.Lucene.csproj @@ -18,7 +18,7 @@ - + diff --git a/Px.Search/Px.Search.csproj b/Px.Search/Px.Search.csproj index 9d9df1be..7da1039c 100644 --- a/Px.Search/Px.Search.csproj +++ b/Px.Search/Px.Search.csproj @@ -15,7 +15,7 @@ - + diff --git a/PxWeb.UnitTests/PxWeb.UnitTests.csproj b/PxWeb.UnitTests/PxWeb.UnitTests.csproj index 910b1811..36184196 100644 --- a/PxWeb.UnitTests/PxWeb.UnitTests.csproj +++ b/PxWeb.UnitTests/PxWeb.UnitTests.csproj @@ -17,10 +17,10 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index 2c7f1b90..ab301944 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -53,12 +53,8 @@ - - - - - - + + diff --git a/PxWebApi.BigTests/PxWebApi.BigTests.csproj b/PxWebApi.BigTests/PxWebApi.BigTests.csproj index ed510499..6e982afa 100644 --- a/PxWebApi.BigTests/PxWebApi.BigTests.csproj +++ b/PxWebApi.BigTests/PxWebApi.BigTests.csproj @@ -23,10 +23,10 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj index b73c9a84..331eda19 100644 --- a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj +++ b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj @@ -19,12 +19,12 @@ - - - - - - + + + + + + From e9ef37eff407f612a809439d475e8e486d4f19cc Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Thu, 9 Apr 2026 14:38:53 +0200 Subject: [PATCH 03/16] Bump .NET SDK and ASP.NET base images to latest versions --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 98ff4761..bf3bcfd4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.100-alpine3.22 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.201-alpine3.23 AS build ARG TARGETARCH WORKDIR /source @@ -15,7 +15,7 @@ RUN \ # Enable globalization and time zones: # https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md # final stage/image -FROM mcr.microsoft.com/dotnet/aspnet:10.0.0-alpine3.22 +FROM mcr.microsoft.com/dotnet/aspnet:10.0.5-alpine3.23 EXPOSE 8080 ENV \ From d03f3632927cc2b7a247e661cb413a50449301e4 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 12:06:30 +0200 Subject: [PATCH 04/16] chore: update package references to version 10.0.6 for Microsoft.Extensions and System.IO libraries --- Px.Search.Lucene/Px.Search.Lucene.csproj | 2 +- Px.Search/Px.Search.csproj | 2 +- PxWeb/PxWeb.csproj | 4 ++-- PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Px.Search.Lucene/Px.Search.Lucene.csproj b/Px.Search.Lucene/Px.Search.Lucene.csproj index 0d7867a0..20f87cc4 100644 --- a/Px.Search.Lucene/Px.Search.Lucene.csproj +++ b/Px.Search.Lucene/Px.Search.Lucene.csproj @@ -18,7 +18,7 @@ - + diff --git a/Px.Search/Px.Search.csproj b/Px.Search/Px.Search.csproj index 7da1039c..0034cd92 100644 --- a/Px.Search/Px.Search.csproj +++ b/Px.Search/Px.Search.csproj @@ -15,7 +15,7 @@ - + diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index aeb905c2..606bcc30 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -53,8 +53,8 @@ - - + + diff --git a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj index 3c500853..582af74f 100644 --- a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj +++ b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj @@ -28,9 +28,9 @@ - - - + + + From e9df9993a5312a6ee9b1442ff46ebd5bf88ea817 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 12:45:23 +0200 Subject: [PATCH 05/16] chore: update .NET SDK and ASP.NET base images to version 10.0.202 and 10.0.6 respectively; add System.Security.Cryptography.Xml package reference --- Dockerfile | 4 ++-- Px.Abstractions/Px.Abstractions.csproj | 1 + PxWeb/PxWeb.csproj | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf3bcfd4..88aa4d34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.201-alpine3.23 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.202-alpine3.23 AS build ARG TARGETARCH WORKDIR /source @@ -15,7 +15,7 @@ RUN \ # Enable globalization and time zones: # https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md # final stage/image -FROM mcr.microsoft.com/dotnet/aspnet:10.0.5-alpine3.23 +FROM mcr.microsoft.com/dotnet/aspnet:10.0.6-alpine3.23 EXPOSE 8080 ENV \ diff --git a/Px.Abstractions/Px.Abstractions.csproj b/Px.Abstractions/Px.Abstractions.csproj index c39d4dfd..f085090a 100644 --- a/Px.Abstractions/Px.Abstractions.csproj +++ b/Px.Abstractions/Px.Abstractions.csproj @@ -15,6 +15,7 @@ + diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index 606bcc30..09e069a2 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -55,6 +55,7 @@ + From b0b81cede922023331458c0fe1c7f2d499b98c75 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 12:50:43 +0200 Subject: [PATCH 06/16] temporary set TreatWarningsAsErrors to False for Release configuration to build docker image --- PxWeb/PxWeb.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index 09e069a2..f30371c1 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -12,7 +12,7 @@ - True + False From 6349d432fe2d4be04fbcdd2e23fd15e6e9a3b38a Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 14:47:48 +0200 Subject: [PATCH 07/16] chore: remove unused Swagger filters and update Swashbuckle.AspNetCore to version 10.1.7 --- PxWeb/Filters/Api2/BasePathFilter.cs | 52 ------ .../GeneratePathParamsValidationFilter.cs | 176 ------------------ PxWeb/Program.cs | 2 +- PxWeb/PxWeb.csproj | 10 +- 4 files changed, 6 insertions(+), 234 deletions(-) delete mode 100644 PxWeb/Filters/Api2/BasePathFilter.cs delete mode 100644 PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs diff --git a/PxWeb/Filters/Api2/BasePathFilter.cs b/PxWeb/Filters/Api2/BasePathFilter.cs deleted file mode 100644 index c9da6d85..00000000 --- a/PxWeb/Filters/Api2/BasePathFilter.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Linq; -using System.Text.RegularExpressions; - -using Microsoft.OpenApi.Models; - -using Swashbuckle.AspNetCore.SwaggerGen; - -namespace PxWeb.Filters.Api2 -{ - /// - /// BasePath Document Filter sets BasePath property of Swagger and removes it from the individual URL paths - /// - public class BasePathFilter : IDocumentFilter - { - /// - /// Constructor - /// - /// BasePath to remove from Operations - public BasePathFilter(string basePath) - { - BasePath = basePath; - } - - /// - /// Gets the BasePath of the Swagger Doc - /// - /// The BasePath of the Swagger Doc - public string BasePath { get; } - - /// - /// Apply the filter - /// - /// OpenApiDocument - /// FilterContext - public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) - { - swaggerDoc.Servers.Add(new OpenApiServer() { Url = this.BasePath }); - - var pathsToModify = swaggerDoc.Paths.Where(p => p.Key.StartsWith(this.BasePath)).ToList(); - - foreach (var path in pathsToModify) - { - if (path.Key.StartsWith(this.BasePath)) - { - string newKey = Regex.Replace(path.Key, $"^{this.BasePath}", string.Empty, RegexOptions.None, TimeSpan.FromMilliseconds(100)); - swaggerDoc.Paths.Remove(path.Key); - swaggerDoc.Paths.Add(newKey, path.Value); - } - } - } - } -} diff --git a/PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs b/PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs deleted file mode 100644 index 03daf37b..00000000 --- a/PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs +++ /dev/null @@ -1,176 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.Linq; - -using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.OpenApi.Models; - -using Swashbuckle.AspNetCore.SwaggerGen; - -namespace PxWeb.Filters.Api2 -{ - /// - /// Path Parameter Validation Rules Filter - /// - public class GeneratePathParamsValidationFilter : IOperationFilter - { - /// - /// Constructor - /// - /// Operation - /// OperationFilterContext - public void Apply(OpenApiOperation operation, OperationFilterContext context) - { - var pars = context.ApiDescription.ParameterDescriptions; - - foreach (var par in pars) - { - var openapiParam = operation.Parameters.SingleOrDefault(p => p.Name == par.Name); - - var attributes = ((ControllerParameterDescriptor)par.ParameterDescriptor).ParameterInfo.CustomAttributes.ToList(); - - // See https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/1147 - // and https://mikeralphson.github.io/openapi/2017/03/15/openapi3.0.0-rc0 - // Basically OpenAPI v3 body parameters are split out into RequestBody and the properties have moved to schema - if (attributes.Any() && openapiParam != null) - { - // Required - [Required] - var requiredAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RequiredAttribute)); - if (requiredAttr != null) - { - openapiParam.Required = true; - } - - // Regex Pattern [RegularExpression] - var regexAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RegularExpressionAttribute)); - if (regexAttr != null) - { - var regex = (string?)regexAttr.ConstructorArguments[0].Value; - openapiParam.Schema.Pattern = regex; - } - - // String Length [StringLength] - int? minLength = null, maxLength = null; - var stringLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(StringLengthAttribute)); - if (stringLengthAttr != null) - { - if (stringLengthAttr.NamedArguments.Count == 1) - { - minLength = (int?)stringLengthAttr.NamedArguments.Single(p => p.MemberName == "MinimumLength").TypedValue.Value; - } - maxLength = (int?)stringLengthAttr.ConstructorArguments[0].Value; - } - - var minLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MinLengthAttribute)); - if (minLengthAttr != null) - { - minLength = (int?)minLengthAttr.ConstructorArguments[0].Value; - } - - var maxLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MaxLengthAttribute)); - if (maxLengthAttr != null) - { - maxLength = (int?)maxLengthAttr.ConstructorArguments[0].Value; - } - - if (minLength != null) - { - openapiParam.Schema.MinLength = minLength; - } - - if (maxLength != null) - { - openapiParam.Schema.MaxLength = maxLength; - } - - // Range [Range] - var rangeAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RangeAttribute)); - if (rangeAttr != null) - { - var rangeMin = (int?)rangeAttr.ConstructorArguments[0].Value; - var rangeMax = (int?)rangeAttr.ConstructorArguments[1].Value; - - openapiParam.Schema.MinLength = rangeMin; - openapiParam.Schema.MaxLength = rangeMax; - } - } - } - } - - //public void Apply(OpenApiOperation operation, OperationFilterContext context) - //{ - // var pars = context.ApiDescription.ParameterDescriptions; - - // foreach (var par in pars) - // { - // var swaggerParam = operation.Parameters.SingleOrDefault(p => p.Name == par.Name); - - // var attributes = ((ControllerParameterDescriptor)par.ParameterDescriptor).ParameterInfo.CustomAttributes; - - // if (attributes != null && attributes.Count() > 0 && swaggerParam != null) - // { - // // Required - [Required] - // var requiredAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RequiredAttribute)); - // if (requiredAttr != null) - // { - // swaggerParam.Required = true; - // } - - // // Regex Pattern [RegularExpression] - // var regexAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RegularExpressionAttribute)); - // if (regexAttr != null) - // { - // string regex = (string)regexAttr.ConstructorArguments[0].Value; - // if (swaggerParam is OpenApiParameter) - // { - // ((OpenApiParameter)swaggerParam).Schema.Pattern = regex; - // } - // } - - // // String Length [StringLength] - // int? minLenght = null, maxLength = null; - // var stringLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(StringLengthAttribute)); - // if (stringLengthAttr != null) - // { - // if (stringLengthAttr.NamedArguments.Count == 1) - // { - // minLenght = (int)stringLengthAttr.NamedArguments.Single(p => p.MemberName == "MinimumLength").TypedValue.Value; - // } - // maxLength = (int)stringLengthAttr.ConstructorArguments[0].Value; - // } - - // var minLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MinLengthAttribute)); - // if (minLengthAttr != null) - // { - // minLenght = (int)minLengthAttr.ConstructorArguments[0].Value; - // } - - // var maxLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MaxLengthAttribute)); - // if (maxLengthAttr != null) - // { - // maxLength = (int)maxLengthAttr.ConstructorArguments[0].Value; - // } - - // if (swaggerParam is OpenApiParameter) - // { - // ((OpenApiParameter)swaggerParam).Schema.MinLength = minLenght; - // ((OpenApiParameter)swaggerParam).Schema.MaxLength = maxLength; - // } - - // // Range [Range] - // var rangeAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RangeAttribute)); - // if (rangeAttr != null) - // { - // int rangeMin = (int)rangeAttr.ConstructorArguments[0].Value; - // int rangeMax = (int)rangeAttr.ConstructorArguments[1].Value; - - // if (swaggerParam is OpenApiParameter) - // { - // ((OpenApiParameter)swaggerParam).Schema.Minimum = rangeMin; - // ((OpenApiParameter)swaggerParam).Schema.Maximum = rangeMax; - // } - // } - // } - // } - //} - } -} diff --git a/PxWeb/Program.cs b/PxWeb/Program.cs index 210e31a8..3f843837 100644 --- a/PxWeb/Program.cs +++ b/PxWeb/Program.cs @@ -10,7 +10,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Serialization; diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index f30371c1..bc47e8c6 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -48,11 +48,11 @@ - - - - - + + + + + From 965ee61f449ad1c6602b43a6b62168e5775ea760 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 14:55:11 +0200 Subject: [PATCH 08/16] Revert "chore: remove unused Swagger filters and update Swashbuckle.AspNetCore to version 10.1.7" This reverts commit 6349d432fe2d4be04fbcdd2e23fd15e6e9a3b38a. --- PxWeb/Filters/Api2/BasePathFilter.cs | 52 ++++++ .../GeneratePathParamsValidationFilter.cs | 176 ++++++++++++++++++ PxWeb/Program.cs | 2 +- PxWeb/PxWeb.csproj | 10 +- 4 files changed, 234 insertions(+), 6 deletions(-) create mode 100644 PxWeb/Filters/Api2/BasePathFilter.cs create mode 100644 PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs diff --git a/PxWeb/Filters/Api2/BasePathFilter.cs b/PxWeb/Filters/Api2/BasePathFilter.cs new file mode 100644 index 00000000..c9da6d85 --- /dev/null +++ b/PxWeb/Filters/Api2/BasePathFilter.cs @@ -0,0 +1,52 @@ +using System.Linq; +using System.Text.RegularExpressions; + +using Microsoft.OpenApi.Models; + +using Swashbuckle.AspNetCore.SwaggerGen; + +namespace PxWeb.Filters.Api2 +{ + /// + /// BasePath Document Filter sets BasePath property of Swagger and removes it from the individual URL paths + /// + public class BasePathFilter : IDocumentFilter + { + /// + /// Constructor + /// + /// BasePath to remove from Operations + public BasePathFilter(string basePath) + { + BasePath = basePath; + } + + /// + /// Gets the BasePath of the Swagger Doc + /// + /// The BasePath of the Swagger Doc + public string BasePath { get; } + + /// + /// Apply the filter + /// + /// OpenApiDocument + /// FilterContext + public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) + { + swaggerDoc.Servers.Add(new OpenApiServer() { Url = this.BasePath }); + + var pathsToModify = swaggerDoc.Paths.Where(p => p.Key.StartsWith(this.BasePath)).ToList(); + + foreach (var path in pathsToModify) + { + if (path.Key.StartsWith(this.BasePath)) + { + string newKey = Regex.Replace(path.Key, $"^{this.BasePath}", string.Empty, RegexOptions.None, TimeSpan.FromMilliseconds(100)); + swaggerDoc.Paths.Remove(path.Key); + swaggerDoc.Paths.Add(newKey, path.Value); + } + } + } + } +} diff --git a/PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs b/PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs new file mode 100644 index 00000000..03daf37b --- /dev/null +++ b/PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs @@ -0,0 +1,176 @@ +using System.ComponentModel.DataAnnotations; +using System.Linq; + +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.OpenApi.Models; + +using Swashbuckle.AspNetCore.SwaggerGen; + +namespace PxWeb.Filters.Api2 +{ + /// + /// Path Parameter Validation Rules Filter + /// + public class GeneratePathParamsValidationFilter : IOperationFilter + { + /// + /// Constructor + /// + /// Operation + /// OperationFilterContext + public void Apply(OpenApiOperation operation, OperationFilterContext context) + { + var pars = context.ApiDescription.ParameterDescriptions; + + foreach (var par in pars) + { + var openapiParam = operation.Parameters.SingleOrDefault(p => p.Name == par.Name); + + var attributes = ((ControllerParameterDescriptor)par.ParameterDescriptor).ParameterInfo.CustomAttributes.ToList(); + + // See https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/1147 + // and https://mikeralphson.github.io/openapi/2017/03/15/openapi3.0.0-rc0 + // Basically OpenAPI v3 body parameters are split out into RequestBody and the properties have moved to schema + if (attributes.Any() && openapiParam != null) + { + // Required - [Required] + var requiredAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RequiredAttribute)); + if (requiredAttr != null) + { + openapiParam.Required = true; + } + + // Regex Pattern [RegularExpression] + var regexAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RegularExpressionAttribute)); + if (regexAttr != null) + { + var regex = (string?)regexAttr.ConstructorArguments[0].Value; + openapiParam.Schema.Pattern = regex; + } + + // String Length [StringLength] + int? minLength = null, maxLength = null; + var stringLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(StringLengthAttribute)); + if (stringLengthAttr != null) + { + if (stringLengthAttr.NamedArguments.Count == 1) + { + minLength = (int?)stringLengthAttr.NamedArguments.Single(p => p.MemberName == "MinimumLength").TypedValue.Value; + } + maxLength = (int?)stringLengthAttr.ConstructorArguments[0].Value; + } + + var minLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MinLengthAttribute)); + if (minLengthAttr != null) + { + minLength = (int?)minLengthAttr.ConstructorArguments[0].Value; + } + + var maxLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MaxLengthAttribute)); + if (maxLengthAttr != null) + { + maxLength = (int?)maxLengthAttr.ConstructorArguments[0].Value; + } + + if (minLength != null) + { + openapiParam.Schema.MinLength = minLength; + } + + if (maxLength != null) + { + openapiParam.Schema.MaxLength = maxLength; + } + + // Range [Range] + var rangeAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RangeAttribute)); + if (rangeAttr != null) + { + var rangeMin = (int?)rangeAttr.ConstructorArguments[0].Value; + var rangeMax = (int?)rangeAttr.ConstructorArguments[1].Value; + + openapiParam.Schema.MinLength = rangeMin; + openapiParam.Schema.MaxLength = rangeMax; + } + } + } + } + + //public void Apply(OpenApiOperation operation, OperationFilterContext context) + //{ + // var pars = context.ApiDescription.ParameterDescriptions; + + // foreach (var par in pars) + // { + // var swaggerParam = operation.Parameters.SingleOrDefault(p => p.Name == par.Name); + + // var attributes = ((ControllerParameterDescriptor)par.ParameterDescriptor).ParameterInfo.CustomAttributes; + + // if (attributes != null && attributes.Count() > 0 && swaggerParam != null) + // { + // // Required - [Required] + // var requiredAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RequiredAttribute)); + // if (requiredAttr != null) + // { + // swaggerParam.Required = true; + // } + + // // Regex Pattern [RegularExpression] + // var regexAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RegularExpressionAttribute)); + // if (regexAttr != null) + // { + // string regex = (string)regexAttr.ConstructorArguments[0].Value; + // if (swaggerParam is OpenApiParameter) + // { + // ((OpenApiParameter)swaggerParam).Schema.Pattern = regex; + // } + // } + + // // String Length [StringLength] + // int? minLenght = null, maxLength = null; + // var stringLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(StringLengthAttribute)); + // if (stringLengthAttr != null) + // { + // if (stringLengthAttr.NamedArguments.Count == 1) + // { + // minLenght = (int)stringLengthAttr.NamedArguments.Single(p => p.MemberName == "MinimumLength").TypedValue.Value; + // } + // maxLength = (int)stringLengthAttr.ConstructorArguments[0].Value; + // } + + // var minLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MinLengthAttribute)); + // if (minLengthAttr != null) + // { + // minLenght = (int)minLengthAttr.ConstructorArguments[0].Value; + // } + + // var maxLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MaxLengthAttribute)); + // if (maxLengthAttr != null) + // { + // maxLength = (int)maxLengthAttr.ConstructorArguments[0].Value; + // } + + // if (swaggerParam is OpenApiParameter) + // { + // ((OpenApiParameter)swaggerParam).Schema.MinLength = minLenght; + // ((OpenApiParameter)swaggerParam).Schema.MaxLength = maxLength; + // } + + // // Range [Range] + // var rangeAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RangeAttribute)); + // if (rangeAttr != null) + // { + // int rangeMin = (int)rangeAttr.ConstructorArguments[0].Value; + // int rangeMax = (int)rangeAttr.ConstructorArguments[1].Value; + + // if (swaggerParam is OpenApiParameter) + // { + // ((OpenApiParameter)swaggerParam).Schema.Minimum = rangeMin; + // ((OpenApiParameter)swaggerParam).Schema.Maximum = rangeMax; + // } + // } + // } + // } + //} + } +} diff --git a/PxWeb/Program.cs b/PxWeb/Program.cs index 3f843837..210e31a8 100644 --- a/PxWeb/Program.cs +++ b/PxWeb/Program.cs @@ -10,7 +10,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Microsoft.OpenApi; +using Microsoft.OpenApi.Models; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Serialization; diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index bc47e8c6..f30371c1 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -48,11 +48,11 @@ - - - - - + + + + + From f37be47df5daf6059a02737251d1a9eae0a3f423 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 15:00:40 +0200 Subject: [PATCH 09/16] chore: remove unused Swagger filters to streamline API documentation --- PxWeb/Filters/Api2/BasePathFilter.cs | 52 ------ .../GeneratePathParamsValidationFilter.cs | 176 ------------------ 2 files changed, 228 deletions(-) delete mode 100644 PxWeb/Filters/Api2/BasePathFilter.cs delete mode 100644 PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs diff --git a/PxWeb/Filters/Api2/BasePathFilter.cs b/PxWeb/Filters/Api2/BasePathFilter.cs deleted file mode 100644 index c9da6d85..00000000 --- a/PxWeb/Filters/Api2/BasePathFilter.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Linq; -using System.Text.RegularExpressions; - -using Microsoft.OpenApi.Models; - -using Swashbuckle.AspNetCore.SwaggerGen; - -namespace PxWeb.Filters.Api2 -{ - /// - /// BasePath Document Filter sets BasePath property of Swagger and removes it from the individual URL paths - /// - public class BasePathFilter : IDocumentFilter - { - /// - /// Constructor - /// - /// BasePath to remove from Operations - public BasePathFilter(string basePath) - { - BasePath = basePath; - } - - /// - /// Gets the BasePath of the Swagger Doc - /// - /// The BasePath of the Swagger Doc - public string BasePath { get; } - - /// - /// Apply the filter - /// - /// OpenApiDocument - /// FilterContext - public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) - { - swaggerDoc.Servers.Add(new OpenApiServer() { Url = this.BasePath }); - - var pathsToModify = swaggerDoc.Paths.Where(p => p.Key.StartsWith(this.BasePath)).ToList(); - - foreach (var path in pathsToModify) - { - if (path.Key.StartsWith(this.BasePath)) - { - string newKey = Regex.Replace(path.Key, $"^{this.BasePath}", string.Empty, RegexOptions.None, TimeSpan.FromMilliseconds(100)); - swaggerDoc.Paths.Remove(path.Key); - swaggerDoc.Paths.Add(newKey, path.Value); - } - } - } - } -} diff --git a/PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs b/PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs deleted file mode 100644 index 03daf37b..00000000 --- a/PxWeb/Filters/Api2/GeneratePathParamsValidationFilter.cs +++ /dev/null @@ -1,176 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.Linq; - -using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.OpenApi.Models; - -using Swashbuckle.AspNetCore.SwaggerGen; - -namespace PxWeb.Filters.Api2 -{ - /// - /// Path Parameter Validation Rules Filter - /// - public class GeneratePathParamsValidationFilter : IOperationFilter - { - /// - /// Constructor - /// - /// Operation - /// OperationFilterContext - public void Apply(OpenApiOperation operation, OperationFilterContext context) - { - var pars = context.ApiDescription.ParameterDescriptions; - - foreach (var par in pars) - { - var openapiParam = operation.Parameters.SingleOrDefault(p => p.Name == par.Name); - - var attributes = ((ControllerParameterDescriptor)par.ParameterDescriptor).ParameterInfo.CustomAttributes.ToList(); - - // See https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/1147 - // and https://mikeralphson.github.io/openapi/2017/03/15/openapi3.0.0-rc0 - // Basically OpenAPI v3 body parameters are split out into RequestBody and the properties have moved to schema - if (attributes.Any() && openapiParam != null) - { - // Required - [Required] - var requiredAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RequiredAttribute)); - if (requiredAttr != null) - { - openapiParam.Required = true; - } - - // Regex Pattern [RegularExpression] - var regexAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RegularExpressionAttribute)); - if (regexAttr != null) - { - var regex = (string?)regexAttr.ConstructorArguments[0].Value; - openapiParam.Schema.Pattern = regex; - } - - // String Length [StringLength] - int? minLength = null, maxLength = null; - var stringLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(StringLengthAttribute)); - if (stringLengthAttr != null) - { - if (stringLengthAttr.NamedArguments.Count == 1) - { - minLength = (int?)stringLengthAttr.NamedArguments.Single(p => p.MemberName == "MinimumLength").TypedValue.Value; - } - maxLength = (int?)stringLengthAttr.ConstructorArguments[0].Value; - } - - var minLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MinLengthAttribute)); - if (minLengthAttr != null) - { - minLength = (int?)minLengthAttr.ConstructorArguments[0].Value; - } - - var maxLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MaxLengthAttribute)); - if (maxLengthAttr != null) - { - maxLength = (int?)maxLengthAttr.ConstructorArguments[0].Value; - } - - if (minLength != null) - { - openapiParam.Schema.MinLength = minLength; - } - - if (maxLength != null) - { - openapiParam.Schema.MaxLength = maxLength; - } - - // Range [Range] - var rangeAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RangeAttribute)); - if (rangeAttr != null) - { - var rangeMin = (int?)rangeAttr.ConstructorArguments[0].Value; - var rangeMax = (int?)rangeAttr.ConstructorArguments[1].Value; - - openapiParam.Schema.MinLength = rangeMin; - openapiParam.Schema.MaxLength = rangeMax; - } - } - } - } - - //public void Apply(OpenApiOperation operation, OperationFilterContext context) - //{ - // var pars = context.ApiDescription.ParameterDescriptions; - - // foreach (var par in pars) - // { - // var swaggerParam = operation.Parameters.SingleOrDefault(p => p.Name == par.Name); - - // var attributes = ((ControllerParameterDescriptor)par.ParameterDescriptor).ParameterInfo.CustomAttributes; - - // if (attributes != null && attributes.Count() > 0 && swaggerParam != null) - // { - // // Required - [Required] - // var requiredAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RequiredAttribute)); - // if (requiredAttr != null) - // { - // swaggerParam.Required = true; - // } - - // // Regex Pattern [RegularExpression] - // var regexAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RegularExpressionAttribute)); - // if (regexAttr != null) - // { - // string regex = (string)regexAttr.ConstructorArguments[0].Value; - // if (swaggerParam is OpenApiParameter) - // { - // ((OpenApiParameter)swaggerParam).Schema.Pattern = regex; - // } - // } - - // // String Length [StringLength] - // int? minLenght = null, maxLength = null; - // var stringLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(StringLengthAttribute)); - // if (stringLengthAttr != null) - // { - // if (stringLengthAttr.NamedArguments.Count == 1) - // { - // minLenght = (int)stringLengthAttr.NamedArguments.Single(p => p.MemberName == "MinimumLength").TypedValue.Value; - // } - // maxLength = (int)stringLengthAttr.ConstructorArguments[0].Value; - // } - - // var minLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MinLengthAttribute)); - // if (minLengthAttr != null) - // { - // minLenght = (int)minLengthAttr.ConstructorArguments[0].Value; - // } - - // var maxLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MaxLengthAttribute)); - // if (maxLengthAttr != null) - // { - // maxLength = (int)maxLengthAttr.ConstructorArguments[0].Value; - // } - - // if (swaggerParam is OpenApiParameter) - // { - // ((OpenApiParameter)swaggerParam).Schema.MinLength = minLenght; - // ((OpenApiParameter)swaggerParam).Schema.MaxLength = maxLength; - // } - - // // Range [Range] - // var rangeAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RangeAttribute)); - // if (rangeAttr != null) - // { - // int rangeMin = (int)rangeAttr.ConstructorArguments[0].Value; - // int rangeMax = (int)rangeAttr.ConstructorArguments[1].Value; - - // if (swaggerParam is OpenApiParameter) - // { - // ((OpenApiParameter)swaggerParam).Schema.Minimum = rangeMin; - // ((OpenApiParameter)swaggerParam).Schema.Maximum = rangeMax; - // } - // } - // } - // } - //} - } -} From 3ccc46a78b59d10ecb316715a5f7908f414d3b20 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 15:03:54 +0200 Subject: [PATCH 10/16] chore: enable TreatWarningsAsErrors for Debug and Release configurations; remove System.Security.Cryptography.Xml package reference --- PxWeb/PxWeb.csproj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index f30371c1..f3c1c968 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -8,11 +8,11 @@ - False + True - False + True @@ -55,7 +55,6 @@ - From a5bea6ed70ca2cf46f1f4f83d49a50e84032ec00 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 15:08:27 +0200 Subject: [PATCH 11/16] chore: remove unused log4net package reference from project file --- Px.Abstractions/Px.Abstractions.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/Px.Abstractions/Px.Abstractions.csproj b/Px.Abstractions/Px.Abstractions.csproj index f085090a..c39d4dfd 100644 --- a/Px.Abstractions/Px.Abstractions.csproj +++ b/Px.Abstractions/Px.Abstractions.csproj @@ -15,7 +15,6 @@ - From ae740442b0bb6482144166a77125609a39c18091 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 16:27:07 +0200 Subject: [PATCH 12/16] chore: update .NET SDK version to 10.0.202 in global.json --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 512142d2..99b1511d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.100", + "version": "10.0.202", "rollForward": "latestFeature" } } From 8cb331560e5e706bc01078e58c89c725d26c555d Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Fri, 17 Apr 2026 16:58:48 +0200 Subject: [PATCH 13/16] temporary allow warnings and patch transitive security issues --- Px.Abstractions/Px.Abstractions.csproj | 1 + PxWeb/PxWeb.csproj | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Px.Abstractions/Px.Abstractions.csproj b/Px.Abstractions/Px.Abstractions.csproj index c39d4dfd..f085090a 100644 --- a/Px.Abstractions/Px.Abstractions.csproj +++ b/Px.Abstractions/Px.Abstractions.csproj @@ -15,6 +15,7 @@ + diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index f3c1c968..f30371c1 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -8,11 +8,11 @@ - True + False - True + False @@ -55,6 +55,7 @@ + From 31a914f1f0a21e298b7144dfd3f7709479cf5bea Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Thu, 23 Apr 2026 13:45:31 +0200 Subject: [PATCH 14/16] build: update package references to latest versions --- Px.Abstractions/Px.Abstractions.csproj | 2 +- Px.Search.Lucene/Px.Search.Lucene.csproj | 2 +- Px.Search/Px.Search.csproj | 2 +- PxWeb/PxWeb.csproj | 13 ++++++------- PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj | 6 +++--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Px.Abstractions/Px.Abstractions.csproj b/Px.Abstractions/Px.Abstractions.csproj index f085090a..a392ab10 100644 --- a/Px.Abstractions/Px.Abstractions.csproj +++ b/Px.Abstractions/Px.Abstractions.csproj @@ -15,7 +15,7 @@ - + diff --git a/Px.Search.Lucene/Px.Search.Lucene.csproj b/Px.Search.Lucene/Px.Search.Lucene.csproj index 20f87cc4..fa6053c1 100644 --- a/Px.Search.Lucene/Px.Search.Lucene.csproj +++ b/Px.Search.Lucene/Px.Search.Lucene.csproj @@ -18,7 +18,7 @@ - + diff --git a/Px.Search/Px.Search.csproj b/Px.Search/Px.Search.csproj index 0034cd92..555545c2 100644 --- a/Px.Search/Px.Search.csproj +++ b/Px.Search/Px.Search.csproj @@ -15,7 +15,7 @@ - + diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index f30371c1..2cce43bf 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -8,11 +8,11 @@ - False + True - False + True @@ -45,17 +45,16 @@ - - + + - - - + + diff --git a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj index 582af74f..5e9ff7f9 100644 --- a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj +++ b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj @@ -28,9 +28,9 @@ - - - + + + From da804e9923013e4fbe8956c4fc5196fa7f5bd7e4 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Thu, 23 Apr 2026 13:49:07 +0200 Subject: [PATCH 15/16] build: update coverlet.collector to version 10.0.0 in test projects --- PxWeb.UnitTests/PxWeb.UnitTests.csproj | 2 +- PxWebApi.BigTests/PxWebApi.BigTests.csproj | 2 +- PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/PxWeb.UnitTests/PxWeb.UnitTests.csproj b/PxWeb.UnitTests/PxWeb.UnitTests.csproj index ad772787..c081cda8 100644 --- a/PxWeb.UnitTests/PxWeb.UnitTests.csproj +++ b/PxWeb.UnitTests/PxWeb.UnitTests.csproj @@ -21,7 +21,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/PxWebApi.BigTests/PxWebApi.BigTests.csproj b/PxWebApi.BigTests/PxWebApi.BigTests.csproj index 0faaf14e..8ab27477 100644 --- a/PxWebApi.BigTests/PxWebApi.BigTests.csproj +++ b/PxWebApi.BigTests/PxWebApi.BigTests.csproj @@ -27,7 +27,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj index 5e9ff7f9..5dc7da8e 100644 --- a/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj +++ b/PxWebApi_Mvc.Tests/PxWebApi_Mvc.Tests.csproj @@ -27,7 +27,10 @@ - + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + From e4fcde0c8931a1bf7ef5ce9a62fcde0dee8ba178 Mon Sep 17 00:00:00 2001 From: Rune Johansen Date: Thu, 23 Apr 2026 14:40:26 +0200 Subject: [PATCH 16/16] build: update .NET SDK and ASP.NET base image versions in Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 88aa4d34..5bff5e83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.202-alpine3.23 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.203-alpine3.23 AS build ARG TARGETARCH WORKDIR /source @@ -15,7 +15,7 @@ RUN \ # Enable globalization and time zones: # https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md # final stage/image -FROM mcr.microsoft.com/dotnet/aspnet:10.0.6-alpine3.23 +FROM mcr.microsoft.com/dotnet/aspnet:10.0.7-alpine3.23 EXPOSE 8080 ENV \