From b383ce48bd3e0ddec68f5adcf5979a9e93dd92c2 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 29 Sep 2024 23:01:21 +0200 Subject: [PATCH 1/7] :memo: updated DocFX --- .docfx/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docfx/index.md b/.docfx/index.md index 6385cb6..8b6ec37 100644 --- a/.docfx/index.md +++ b/.docfx/index.md @@ -8,7 +8,7 @@ title: Extensions for Asp.Versioning by Codebelt Originally, this project was part of **Cuemon for .NET**, but with the forthcoming release of .NET 9, it was split into its own project. -This project is now part of [Extensions for Asp.Versioning by Codebelt](https://github.com/codebeltnet/asp-versioning). +This project is now part of [Extensions for Asp.Versioning API by Codebelt](https://github.com/codebeltnet/asp-versioning). [Cuemon for .NET](https://www.cuemon.net/) will pursue its original purpose; providing an addition/complement/sidecar to Microsoft .NET platform. From 9d10ab5a59cf00564777e0531970e75a6fcb34a9 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 29 Sep 2024 23:01:44 +0200 Subject: [PATCH 2/7] :package: updated NuGet package definition --- .../PackageReleaseNotes.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.nuget/Codebelt.Extensions.Asp.Versioning/PackageReleaseNotes.txt b/.nuget/Codebelt.Extensions.Asp.Versioning/PackageReleaseNotes.txt index 167b1b7..de16227 100644 --- a/.nuget/Codebelt.Extensions.Asp.Versioning/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Extensions.Asp.Versioning/PackageReleaseNotes.txt @@ -1,4 +1,11 @@ -Version 8.4.0 +Version 9.0.0 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +- REMOVED Support for TFM .NET 6 (LTS) +  +Version 8.4.0 Availability: .NET 8 and .NET 6   # ALM From 3cd9ffae9c45f7c198281c0c15374667e47b8c66 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 29 Sep 2024 23:02:07 +0200 Subject: [PATCH 3/7] :construction_worker: updated CI/CD pipeline --- .github/workflows/pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index c128753..f2c8326 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -1,12 +1,12 @@ name: Asp.Versioning Ext. CI/CD Pipeline on: pull_request: - branches: [main] paths-ignore: - .codecov - .docfx - .github - .nuget + - '**.md' workflow_dispatch: inputs: configuration: @@ -26,7 +26,7 @@ jobs: strategy: matrix: configuration: [Debug, Release] - framework: [net8.0,net6.0] + framework: [net9.0,net8.0] outputs: version: ${{ steps.minver-calculate.outputs.version }} steps: From 32f9e048178a527943ca79986604f2ec0dd22fc2 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 29 Sep 2024 23:07:25 +0200 Subject: [PATCH 4/7] :arrow_up: bump dependencies :heavy_minus_sign: remove support for TFM .net6.0 --- Directory.Build.props | 16 ++++++---------- .../Codebelt.Extensions.Asp.Versioning.csproj | 15 ++------------- ...debelt.Extensions.Asp.Versioning.Tests.csproj | 10 +++++----- testenvironments.json | 2 +- 4 files changed, 14 insertions(+), 29 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 89b3e46..05b7494 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,7 +15,7 @@ - net8.0;net6.0 + net9.0;net8.0 Copyright © Geekle 2024. All rights reserved. gimlichael Geekle @@ -48,12 +48,8 @@ - - net8.0;net6.0 - - - - net8.0;net6.0 + + net9.0;net8.0 @@ -70,8 +66,8 @@ - - + + all @@ -81,7 +77,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Codebelt.Extensions.Asp.Versioning/Codebelt.Extensions.Asp.Versioning.csproj b/src/Codebelt.Extensions.Asp.Versioning/Codebelt.Extensions.Asp.Versioning.csproj index 215a800..1b44797 100644 --- a/src/Codebelt.Extensions.Asp.Versioning/Codebelt.Extensions.Asp.Versioning.csproj +++ b/src/Codebelt.Extensions.Asp.Versioning/Codebelt.Extensions.Asp.Versioning.csproj @@ -9,23 +9,12 @@ extension-methods extensions restful-api-versioning versioning - + - - - - - - - - - - - - + diff --git a/test/Codebelt.Extensions.Asp.Versioning.Tests/Codebelt.Extensions.Asp.Versioning.Tests.csproj b/test/Codebelt.Extensions.Asp.Versioning.Tests/Codebelt.Extensions.Asp.Versioning.Tests.csproj index 28fbcac..b11f2bc 100644 --- a/test/Codebelt.Extensions.Asp.Versioning.Tests/Codebelt.Extensions.Asp.Versioning.Tests.csproj +++ b/test/Codebelt.Extensions.Asp.Versioning.Tests/Codebelt.Extensions.Asp.Versioning.Tests.csproj @@ -5,11 +5,11 @@ - - - - - + + + + + diff --git a/testenvironments.json b/testenvironments.json index 046978a..3cd700b 100644 --- a/testenvironments.json +++ b/testenvironments.json @@ -9,7 +9,7 @@ { "name": "Docker-Ubuntu", "type": "docker", - "dockerImage": "gimlichael/ubuntu-testrunner:net6.0.424-net8.0.303" + "dockerImage": "gimlichael/ubuntu-testrunner:net6.0.425-net8.0.401-9.0.100-rc.1.24452.12" } ] } From 580454457b44e297d9fbe4a4142217b6777b0cda Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 29 Sep 2024 23:12:40 +0200 Subject: [PATCH 5/7] :speech_balloon: updated community health pages --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 266c211..3ba4eca 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![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) -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. +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. ### 📦 Standalone Packages From bba421aa784bfd6863ff6d8619a7e72d6a6f3d02 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 29 Sep 2024 23:14:21 +0200 Subject: [PATCH 6/7] :construction_worker: support for build-number --- Directory.Build.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 57906f4..05374a0 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -14,8 +14,8 @@ - 00000 - $(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(BUILD_BUILDNUMBER) + 0 + $(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(GITHUB_RUN_NUMBER) From e0f93346bbff89ec9134fff0e074372ee12c68cc Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Sun, 29 Sep 2024 23:14:41 +0200 Subject: [PATCH 7/7] :white_check_mark: fixed test to work with .net 9 previews --- .../ApiVersionReaderTest.cs | 10 +++++++--- .../ProblemDetailsFactoryTest.cs | 6 ++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/test/Codebelt.Extensions.Asp.Versioning.Tests/ApiVersionReaderTest.cs b/test/Codebelt.Extensions.Asp.Versioning.Tests/ApiVersionReaderTest.cs index 42a7277..8420c60 100644 --- a/test/Codebelt.Extensions.Asp.Versioning.Tests/ApiVersionReaderTest.cs +++ b/test/Codebelt.Extensions.Asp.Versioning.Tests/ApiVersionReaderTest.cs @@ -147,10 +147,12 @@ public async Task GetRequest_ShouldFailWithBadRequestFormattedAsJsonResponse_As_ Assert.EndsWith(jsonAccept, sut.Content.Headers.ContentType.ToString()); Assert.True(Match(@"{ ""error"": { + ""instance"": ""http://localhost/fake/throw"", ""status"": 400, ""code"": ""BadRequest"", ""message"": ""The HTTP resource that matches the request URI \u0027http://localhost/fake/throw\u0027 does not support the API version \u0027d3\u0027."" - } + }, + ""traceId"": ""*"" }".ReplaceLineEndings(), (await sut.Content.ReadAsStringAsync()).ReplaceLineEndings())); } } @@ -187,7 +189,7 @@ public async Task GetRequest_ShouldFailWithBadRequestFormattedAsXmlResponse_As_d Assert.Equal(HttpStatusCode.BadRequest, sut.StatusCode); Assert.Equal(HttpMethod.Get, sut.RequestMessage.Method); Assert.EndsWith(xmlAccept, sut.Content.Headers.ContentType.ToString()); - Assert.True(Match(@"400BadRequestThe HTTP resource that matches the request URI 'http://localhost/fake/throw' does not support the API version 'd3'.", await sut.Content.ReadAsStringAsync())); + Assert.True(Match(@"http://localhost/fake/throw400BadRequestThe HTTP resource that matches the request URI 'http://localhost/fake/throw' does not support the API version 'd3'.*", await sut.Content.ReadAsStringAsync())); } } @@ -270,6 +272,7 @@ public async Task GetRequest_ShouldFailWithBadRequestFormattedAsNewtonsoftJsonRe Assert.True(Match($$""" { "error": { + "instance": "http://localhost/fake/throw", "status": 400, "code": "BadRequest", "message": "The HTTP resource that matches the request URI 'http://localhost/fake/throw' does not support the API version 'd3'." @@ -295,7 +298,8 @@ public async Task GetRequest_ShouldFailWithBadRequestFormattedAsNewtonsoftJsonRe "cookies": [], "body": "" } - } + }, + "traceId": "*" } """.ReplaceLineEndings(), (await sut.Content.ReadAsStringAsync()).ReplaceLineEndings())); } diff --git a/test/Codebelt.Extensions.Asp.Versioning.Tests/ProblemDetailsFactoryTest.cs b/test/Codebelt.Extensions.Asp.Versioning.Tests/ProblemDetailsFactoryTest.cs index cd6d117..d668eed 100644 --- a/test/Codebelt.Extensions.Asp.Versioning.Tests/ProblemDetailsFactoryTest.cs +++ b/test/Codebelt.Extensions.Asp.Versioning.Tests/ProblemDetailsFactoryTest.cs @@ -105,7 +105,7 @@ public async Task GetRequest_ShouldFailWithBadRequestFormattedAsXmlResponse_As_b Assert.Equal(HttpStatusCode.BadRequest, sut.StatusCode); Assert.Equal(HttpMethod.Get, sut.RequestMessage.Method); Assert.EndsWith("application/xml", sut.Content.Headers.ContentType.ToString()); - Assert.True(Match(@"400BadRequestThe HTTP resource that matches the request URI 'http://localhost/fake/throw' does not support the API version 'b3'.", await sut.Content.ReadAsStringAsync())); + Assert.True(Match(@"http://localhost/fake/throw400BadRequestThe HTTP resource that matches the request URI 'http://localhost/fake/throw' does not support the API version 'b3'.*", await sut.Content.ReadAsStringAsync())); } } @@ -143,10 +143,12 @@ public async Task GetRequest_ShouldFailWithBadRequestFormattedAsJsonResponse_As_ Assert.True(Match(""" { "error": { + "instance": "http://localhost/fake/throw", "status": 400, "code": "BadRequest", "message": "The HTTP resource that matches the request URI \u0027http://localhost/fake/throw\u0027 does not support the API version \u0027b3\u0027." - } + }, + "traceId": "*" } """.ReplaceLineEndings(), (await sut.Content.ReadAsStringAsync()))); }