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. 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: 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 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/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) 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 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/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/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/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()))); } 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" } ] }