From b62ed92468891c1e3ae6b7dc8c02bea08181f0b4 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 13 Nov 2025 21:12:20 +0100 Subject: [PATCH 1/7] :arrow_up: bump dependencies --- .docfx/Dockerfile.docfx | 4 ++-- .docfx/docfx.json | 2 +- .docfx/includes/availability-default.md | 2 +- .docfx/includes/availability-modern.md | 2 +- Directory.Packages.props | 20 ++++++++++---------- testenvironments.json | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.docfx/Dockerfile.docfx b/.docfx/Dockerfile.docfx index 5cc1890..14b7583 100644 --- a/.docfx/Dockerfile.docfx +++ b/.docfx/Dockerfile.docfx @@ -1,9 +1,9 @@ -ARG NGINX_VERSION=1.29.1-alpine +ARG NGINX_VERSION=1.29.3-alpine FROM --platform=$BUILDPLATFORM nginx:${NGINX_VERSION} AS base RUN rm -rf /usr/share/nginx/html/* -FROM --platform=$BUILDPLATFORM codebeltnet/docfx:2.78.3 AS build +FROM --platform=$BUILDPLATFORM codebeltnet/docfx:2.78.4 AS build ADD [".", "docfx"] diff --git a/.docfx/docfx.json b/.docfx/docfx.json index 1223437..9c413e8 100644 --- a/.docfx/docfx.json +++ b/.docfx/docfx.json @@ -12,7 +12,7 @@ "dest": "api", "filter": "filterConfig.yml", "properties": { - "TargetFramework": "net9.0" + "TargetFramework": "net10.0" } } ], diff --git a/.docfx/includes/availability-default.md b/.docfx/includes/availability-default.md index 89f4c06..fa28d0e 100644 --- a/.docfx/includes/availability-default.md +++ b/.docfx/includes/availability-default.md @@ -1 +1 @@ -Availability: .NET 9, .NET 8 and .NET Standard 2.0 \ No newline at end of file +Availability: .NET 10, .NET 9 and .NET Standard 2.0 \ No newline at end of file diff --git a/.docfx/includes/availability-modern.md b/.docfx/includes/availability-modern.md index abf5369..af5cf4b 100644 --- a/.docfx/includes/availability-modern.md +++ b/.docfx/includes/availability-modern.md @@ -1 +1 @@ -Availability: .NET 9 and .NET 8 \ No newline at end of file +Availability: .NET 10 and .NET 9 \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props index bd94aed..9044a6f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,19 +7,19 @@ - - - - - - - - + + + + + + + + - - + + \ No newline at end of file diff --git a/testenvironments.json b/testenvironments.json index 8e4ae2c..2bc34cb 100644 --- a/testenvironments.json +++ b/testenvironments.json @@ -9,7 +9,7 @@ { "name": "Docker-Ubuntu", "type": "docker", - "dockerImage": "gimlichael/ubuntu-testrunner:net8.0.415-9.0.306" + "dockerImage": "gimlichael/ubuntu-testrunner:net8.0.416-9.0.307-10.0.100" } ] } From 0e7c724141cd0e1174fd446fb81fb4e9e2aed015 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 13 Nov 2025 21:12:54 +0100 Subject: [PATCH 2/7] :package: updated NuGet package definition --- .../PackageReleaseNotes.txt | 10 +++++++++- .nuget/Codebelt.Extensions.Asp.Versioning/README.md | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.nuget/Codebelt.Extensions.Asp.Versioning/PackageReleaseNotes.txt b/.nuget/Codebelt.Extensions.Asp.Versioning/PackageReleaseNotes.txt index 666e1e2..79b01b3 100644 --- a/.nuget/Codebelt.Extensions.Asp.Versioning/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Extensions.Asp.Versioning/PackageReleaseNotes.txt @@ -1,4 +1,12 @@ -Version 9.0.8 +Version 10.0.0 +Availability: .NET 10 and .NET 9 +  +# ALM +- ADDED Support for TFM .NET 10 (LTS) +- REMOVED Support for TFM .NET 8 (LTS) +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) +  +Version 9.0.8 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Codebelt.Extensions.Asp.Versioning/README.md b/.nuget/Codebelt.Extensions.Asp.Versioning/README.md index 2c68898..a10e9bc 100644 --- a/.nuget/Codebelt.Extensions.Asp.Versioning/README.md +++ b/.nuget/Codebelt.Extensions.Asp.Versioning/README.md @@ -2,6 +2,8 @@ An open-source project (MIT license) that targets and complements the [asp-versioning](https://github.com/dotnet/aspnet-api-versioning) versioning engine. It aims to provide a uniform and convenient developer experience when working with RESTful API versioning. +Your versatile Asp.Versioning companion for modern development with `.NET 9` and `.NET 10`. + It is, by heart, free, flexible and built to extend and boost your agile codebelt. ## **Codebelt.Extensions.Asp.Versioning** for .NET From 44941bc093f44a7a1abb2a428a093fe0442fa6a8 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 13 Nov 2025 21:13:12 +0100 Subject: [PATCH 3/7] :speech_balloon: updated community health pages --- CHANGELOG.md | 6 ++++++ README.md | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84751e8..baf833a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ For more details, please refer to `PackageReleaseNotes.txt` on a per assembly ba > [!NOTE] > Changelog entries prior to version 8.4.0 was migrated from previous versions of Cuemon.Extensions.Asp.Versioning. +## [10.0.0] - 2025-11-13 + +This is a major release that focuses on adapting the latest `.NET 10` release (LTS) in exchange for current `.NET 8` (LTS). + +> To ensure access to current features, improvements, and security updates, and to keep the codebase clean and easy to maintain, we target only the latest long-term (LTS), short-term (STS) and (where applicable) cross-platform .NET versions. + ## [9.0.8] - 2025-10-20 This is a service update that focuses on package dependencies. diff --git a/README.md b/README.md index 9b27de3..a426c05 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,16 @@ [![Asp.Versioning Ext. CI/CD Pipeline](https://github.com/codebeltnet/asp-versioning/actions/workflows/pipelines.yml/badge.svg)](https://github.com/codebeltnet/asp-versioning/actions/workflows/pipelines.yml) [![codecov](https://codecov.io/gh/codebeltnet/asp-versioning/graph/badge.svg?token=BN2UhFM3bb)](https://codecov.io/gh/codebeltnet/asp-versioning) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=asp-versioning&metric=alert_status)](https://sonarcloud.io/dashboard?id=asp-versioning) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=asp-versioning&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=asp-versioning) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=asp-versioning&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=asp-versioning) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=asp-versioning&metric=security_rating)](https://sonarcloud.io/dashboard?id=asp-versioning) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/codebeltnet/asp-versioning/badge)](https://scorecard.dev/viewer/?uri=github.com/codebeltnet/asp-versioning) +### ℹ️ About + An open-source project (MIT license) that targets and complements the [Asp.Versioning](https://github.com/dotnet/aspnet-api-versioning) versioning engine. It aims to provide a uniform and convenient developer experience when working with RESTful API versioning. +Your versatile Asp.Versioning companion for modern development with `.NET 9` and `.NET 10`. + +It is, by heart, free, flexible and built to extend and boost your agile codebelt. + +### 📚 Documentation + Full documentation (generated by [DocFx](https://github.com/dotnet/docfx)) located here: https://versioning.codebelt.net/ ### 📦 Standalone Packages From 432e194570cfeddb5494b6405b7c3b4a9c8bf1c3 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 13 Nov 2025 21:13:43 +0100 Subject: [PATCH 4/7] :heavy_plus_sign: added support for net10.0 TFM :heavy_minus_sign: remove support for net8.0 TFM --- Directory.Build.props | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 2c8ce36..a5305ed 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,7 +15,7 @@ - net9.0;net8.0 + net10.0;net9.0 Copyright © Geekle 2024-2025. All rights reserved. gimlichael Geekle @@ -48,10 +48,11 @@ - net9.0;net8.0 + net10.0;net9.0 + Exe false false false @@ -61,12 +62,13 @@ none NU1701,NETSDK1206 false + true - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive From 00690a7d14e464e2bb2b68584cf235e7a90a0e39 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 13 Nov 2025 21:13:54 +0100 Subject: [PATCH 5/7] :arrow_up: xUnit v3 migration --- .../ApiVersionReaderTest.cs | 1 - .../ProblemDetailsFactoryTest.cs | 11 +---------- .../RestfulApiVersioningOptionsTest.cs | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/test/Codebelt.Extensions.Asp.Versioning.Tests/ApiVersionReaderTest.cs b/test/Codebelt.Extensions.Asp.Versioning.Tests/ApiVersionReaderTest.cs index 8bb8259..91d338b 100644 --- a/test/Codebelt.Extensions.Asp.Versioning.Tests/ApiVersionReaderTest.cs +++ b/test/Codebelt.Extensions.Asp.Versioning.Tests/ApiVersionReaderTest.cs @@ -18,7 +18,6 @@ using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; using Xunit; -using Xunit.Abstractions; using YamlDotNet.Serialization.NamingConventions; namespace Codebelt.Extensions.Asp.Versioning diff --git a/test/Codebelt.Extensions.Asp.Versioning.Tests/ProblemDetailsFactoryTest.cs b/test/Codebelt.Extensions.Asp.Versioning.Tests/ProblemDetailsFactoryTest.cs index b4aa9d1..cb95f32 100644 --- a/test/Codebelt.Extensions.Asp.Versioning.Tests/ProblemDetailsFactoryTest.cs +++ b/test/Codebelt.Extensions.Asp.Versioning.Tests/ProblemDetailsFactoryTest.cs @@ -17,7 +17,6 @@ using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; using Xunit; -using Xunit.Abstractions; using YamlDotNet.Serialization.NamingConventions; namespace Codebelt.Extensions.Asp.Versioning @@ -28,7 +27,6 @@ public ProblemDetailsFactoryTest(ITestOutputHelper output) : base(output) { } -#if NET8_0_OR_GREATER [Fact] public async Task GetRequest_ShouldFailWithBadRequest_FormattedAsRfc7807_As_b3_IsAnUnknownVersion() { @@ -58,20 +56,13 @@ public async Task GetRequest_ShouldFailWithBadRequest_FormattedAsRfc7807_As_b3_I Assert.Equal(HttpMethod.Get, sut.RequestMessage.Method); Assert.EndsWith("application/problem+json", sut.Content.Headers.ContentType.ToString()); -#if NET9_0 + var expected = """{"type":"https://docs.api-versioning.org/problems#invalid","title":"Invalid API version","status":400,"detail":"The HTTP resource that matches the request URI 'http://localhost/fake/' does not support the API version 'b3'.","traceId":"*"}"""; Assert.True(Match(expected, await sut.Content.ReadAsStringAsync())); -#else - var expected = @"{""type"":""https://docs.api-versioning.org/problems#invalid"",""title"":""Invalid API version"",""status"":400,""detail"":""The HTTP resource that matches the request URI 'http://localhost/fake/' does not support the API version 'b3'.""}"; - Assert.Equal(expected, await sut.Content.ReadAsStringAsync()); -#endif - - // sadly Microsoft does not use the formatter we feed into the pipeline .. they use their own horrid WriteJsonAsync implementation .. } } -#endif [Fact] public async Task GetRequest_ShouldFailWithBadRequestFormattedAsXmlResponse_As_b3_IsAnUnknownVersion() diff --git a/test/Codebelt.Extensions.Asp.Versioning.Tests/RestfulApiVersioningOptionsTest.cs b/test/Codebelt.Extensions.Asp.Versioning.Tests/RestfulApiVersioningOptionsTest.cs index 6caf938..4c2a284 100644 --- a/test/Codebelt.Extensions.Asp.Versioning.Tests/RestfulApiVersioningOptionsTest.cs +++ b/test/Codebelt.Extensions.Asp.Versioning.Tests/RestfulApiVersioningOptionsTest.cs @@ -3,7 +3,6 @@ using Codebelt.Extensions.Xunit; using Cuemon; using Xunit; -using Xunit.Abstractions; namespace Codebelt.Extensions.Asp.Versioning { From c1ce7ec1076a186b759b85eed04d611d1439d740 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 13 Nov 2025 21:14:21 +0100 Subject: [PATCH 6/7] :coffin: removed dead code --- .../RestfulProblemDetailsFactory.cs | 50 ------------------- .../ServiceCollectionExtensions.cs | 10 +--- 2 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 src/Codebelt.Extensions.Asp.Versioning/RestfulProblemDetailsFactory.cs diff --git a/src/Codebelt.Extensions.Asp.Versioning/RestfulProblemDetailsFactory.cs b/src/Codebelt.Extensions.Asp.Versioning/RestfulProblemDetailsFactory.cs deleted file mode 100644 index 361b5a9..0000000 --- a/src/Codebelt.Extensions.Asp.Versioning/RestfulProblemDetailsFactory.cs +++ /dev/null @@ -1,50 +0,0 @@ -#if NET6_0 -using System; -using System.Linq; -using Asp.Versioning; -using Cuemon.AspNetCore.Http; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; - -namespace Codebelt.Extensions.Asp.Versioning -{ - /// - /// Represents a RESTful implementation of the which throws variants of that needs to be translated accordingly. - /// - /// This class was introduced because of the design decisions made of the author of Asp.Versioning; for more information have a read at https://github.com/dotnet/aspnet-api-versioning/issues/886 - public class RestfulProblemDetailsFactory : IProblemDetailsFactory - { - /// - /// Creates and returns a new problem details instance. - /// - /// The current HTTP request. - /// The value for . - /// The value for . - /// The value for . - /// The value for . - /// The value for . - /// A new instance. - public ProblemDetails CreateProblemDetails(HttpRequest request, int? statusCode = null, string title = null, string type = null, string detail = null, string instance = null) - { - var problemDetails = new ProblemDetails() - { - Status = statusCode ?? 500, - Title = title, - Type = type, - Detail = detail, - Instance = instance, - }; - - DefaultProblemDetailsFactory.ApplyExtensions(problemDetails); - - var value = problemDetails.Extensions.FirstOrDefault(pair => pair.Key.Equals("Code", StringComparison.OrdinalIgnoreCase)).Value; - if (value != null && HttpStatusCodeException.TryParse(problemDetails.Status ?? 500, problemDetails.Detail ?? problemDetails.Title ?? value.ToString(), null, out var statusCodeEquivalentException)) - { - throw statusCodeEquivalentException; - } - - throw new InternalServerErrorException(problemDetails.Detail); - } - } -} -#endif diff --git a/src/Codebelt.Extensions.Asp.Versioning/ServiceCollectionExtensions.cs b/src/Codebelt.Extensions.Asp.Versioning/ServiceCollectionExtensions.cs index c85dc45..a855e62 100644 --- a/src/Codebelt.Extensions.Asp.Versioning/ServiceCollectionExtensions.cs +++ b/src/Codebelt.Extensions.Asp.Versioning/ServiceCollectionExtensions.cs @@ -2,10 +2,7 @@ using Asp.Versioning; using Cuemon; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; -#if NET8_0_OR_GREATER using Cuemon.AspNetCore.Http; -#endif namespace Codebelt.Extensions.Asp.Versioning { @@ -43,11 +40,6 @@ public static IServiceCollection AddRestfulApiVersioning(this IServiceCollection o.SubstituteApiVersionInUrl = true; }); -#if NET6_0 - if (options.ProblemDetailsFactoryType != null && options.ProblemDetailsFactoryType != typeof(DefaultProblemDetailsFactory)) { services.Replace(ServiceDescriptor.Singleton(_ => Activator.CreateInstance(options.ProblemDetailsFactoryType) as IProblemDetailsFactory)); } -#endif - -#if NET8_0_OR_GREATER if (options.UseBuiltInRfc7807) { services.AddProblemDetails(); @@ -65,7 +57,7 @@ public static IServiceCollection AddRestfulApiVersioning(this IServiceCollection throw new InternalServerErrorException(pd.Detail); }); } -#endif + return services; } } From a6d37936e97d50ded59f0757a788634fe6455c75 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 13 Nov 2025 21:14:32 +0100 Subject: [PATCH 7/7] :construction_worker: updated CI and excluded codeql as github did not apply fix for .net10 https://github.com/github/codeql-action/issues/3207 --- .github/workflows/pipelines.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 5a8046f..0225cbf 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: configuration: [Debug, Release] - uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v2 + uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v3 with: configuration: ${{ matrix.configuration }} strong-name-key-filename: versioning.snk @@ -41,7 +41,7 @@ jobs: strategy: matrix: configuration: [Debug, Release] - uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v2 + uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v3 with: configuration: ${{ matrix.configuration }} version: ${{ needs.build.outputs.version }} @@ -54,17 +54,18 @@ jobs: matrix: os: [ubuntu-24.04, windows-2022] configuration: [Debug, Release] - uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v2 + uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v3 with: configuration: ${{ matrix.configuration }} runs-on: ${{ matrix.os }} build-switches: -p:SkipSignAssembly=true restore: true + build: true # needed for xunitv3 sonarcloud: name: call-sonarcloud needs: [build,test] - uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v2 + uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v3 with: organization: geekle projectKey: asp-versioning @@ -79,18 +80,18 @@ jobs: repository: codebeltnet/asp-versioning secrets: inherit - codeql: - name: call-codeql - needs: [build,test] - uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v2 - permissions: - security-events: write + # codeql: + # name: call-codeql + # needs: [build,test] + # uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v3 + # permissions: + # security-events: write deploy: if: github.event_name != 'pull_request' name: call-nuget - needs: [build, pack, test, sonarcloud, codecov, codeql] - uses: codebeltnet/jobs-nuget-push/.github/workflows/default.yml@v1 + needs: [build, pack, test, sonarcloud, codecov] + uses: codebeltnet/jobs-nuget-push/.github/workflows/default.yml@v2 with: version: ${{ needs.build.outputs.version }} environment: Production