Skip to content

Commit

Permalink
Change to Corvus.UriTemplates (#324)
Browse files Browse the repository at this point in the history
Also:

* Bump major version.
* Downgrade .NET 7 SDK due to 7.0.200's package-breaking change

This requires a major version bump because although it should be source-compatible, it is a binary breaking change.
  • Loading branch information
idg10 authored Feb 17, 2023
1 parent 719acc3 commit 96dfff2
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 807 deletions.
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ branches:
- feature
- support
- hotfix
next-version: "4.0"
next-version: "5.0"

2 changes: 1 addition & 1 deletion Solutions/Menes.Abstractions/Menes.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<PackageReference Include="Corvus.Extensions" Version="1.1.10" />
<PackageReference Include="Corvus.Extensions.Newtonsoft.Json" Version="3.0.0" />
<PackageReference Include="Corvus.Monitoring.Instrumentation.Abstractions" Version="1.3.2" />
<PackageReference Include="Corvus.UriTemplates" Version="1.1.0" />
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -33,7 +34,6 @@
</PackageReference>
<PackageReference Include="System.Interactive" Version="[4.1.*,)" />
<PackageReference Include="System.Text.Encodings.Web" Version="[4.7.*,)" />
<PackageReference Include="Tavis.UriTemplates" Version="1.1.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
namespace Menes
{
using System.Diagnostics.CodeAnalysis;

using Corvus.UriTemplates.TavisApi;

using Microsoft.OpenApi.Models;
using Tavis.UriTemplates;

/// <summary>
/// Provides services over a collection of OpenApi documents.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ namespace Menes
using System.Text;
using System.Text.Encodings.Web;
using Corvus.Extensions;
using Corvus.UriTemplates.TavisApi;
using Menes.Exceptions;
using Menes.Internal;
using Menes.Validation;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models;
using Tavis.UriTemplates;

/// <summary>
/// A URI template provider for Open API operations.
Expand Down Expand Up @@ -70,7 +70,7 @@ private IDictionary<string, OpenApiPathTemplate> PathTemplatesByOperationId
/// <inheritdoc/>
public UriTemplate GetUriTemplateForOperation(string operationId)
{
return new UriTemplate(this.PathTemplatesByOperationId[operationId]?.UriTemplate.ToString());
return new UriTemplate(this.PathTemplatesByOperationId[operationId].UriTemplate.ToString());
}

/// <inheritdoc/>
Expand Down
4 changes: 3 additions & 1 deletion Solutions/Menes.Abstractions/Menes/OpenApiPathTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
namespace Menes
{
using System.Text.RegularExpressions;

using Corvus.UriTemplates.TavisApi;

using Microsoft.OpenApi.Models;
using Tavis.UriTemplates;

/// <summary>
/// A path template from the OpenAPI document.
Expand Down
Loading

0 comments on commit 96dfff2

Please sign in to comment.