From 56f65c19e21e9f5bab3e615f54920bd2b867012f Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Fri, 19 Dec 2025 18:33:58 +0100 Subject: [PATCH] Upgrade RamlToOpenApiConverter and YamlDotNet (#1399) * Upgrade RamlToOpenApiConverter and YamlDotNet * fix --- .../Extensions/OpenApiSchemaExtensions.cs | 4 +--- .../Mappers/OpenApiPathsMapper.cs | 3 +-- .../Settings/IWireMockOpenApiParserExampleValues.cs | 2 +- .../WireMockOpenApiParserDynamicExampleValues.cs | 2 +- .../Settings/WireMockOpenApiParserExampleValues.cs | 3 +-- .../Utils/ExampleValueGenerator.cs | 3 +-- .../WireMock.Net.OpenApiParser.csproj | 12 ++++++------ .../WireMockOpenApiParser.cs | 2 +- test/WireMock.Net.Tests/WireMockServerTests.cs | 2 +- 9 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs b/src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs index 51da19f3..dc17200c 100644 --- a/src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs +++ b/src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs @@ -5,9 +5,7 @@ using System.Linq; using System.Reflection; using System.Text.Json; using System.Text.Json.Nodes; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; +using Microsoft.OpenApi; using WireMock.Net.OpenApiParser.Types; namespace WireMock.Net.OpenApiParser.Extensions; diff --git a/src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs b/src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs index 2a8616f0..2c922363 100644 --- a/src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs +++ b/src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs @@ -6,8 +6,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text.Json; using System.Text.Json.Nodes; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; +using Microsoft.OpenApi; using Newtonsoft.Json; using Stef.Validation; using WireMock.Admin.Mappings; diff --git a/src/WireMock.Net.OpenApiParser/Settings/IWireMockOpenApiParserExampleValues.cs b/src/WireMock.Net.OpenApiParser/Settings/IWireMockOpenApiParserExampleValues.cs index 5d335144..6c3b3953 100644 --- a/src/WireMock.Net.OpenApiParser/Settings/IWireMockOpenApiParserExampleValues.cs +++ b/src/WireMock.Net.OpenApiParser/Settings/IWireMockOpenApiParserExampleValues.cs @@ -1,7 +1,7 @@ // Copyright © WireMock.Net using System; -using Microsoft.OpenApi.Models.Interfaces; +using Microsoft.OpenApi; namespace WireMock.Net.OpenApiParser.Settings; diff --git a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserDynamicExampleValues.cs b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserDynamicExampleValues.cs index 194762c5..0f27bf31 100644 --- a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserDynamicExampleValues.cs +++ b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserDynamicExampleValues.cs @@ -1,7 +1,7 @@ // Copyright © WireMock.Net using System; -using Microsoft.OpenApi.Models.Interfaces; +using Microsoft.OpenApi; using RandomDataGenerator.FieldOptions; using RandomDataGenerator.Randomizers; diff --git a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserExampleValues.cs b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserExampleValues.cs index 3b3c6fea..5acec53a 100644 --- a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserExampleValues.cs +++ b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserExampleValues.cs @@ -1,8 +1,7 @@ // Copyright © WireMock.Net using System; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; +using Microsoft.OpenApi; namespace WireMock.Net.OpenApiParser.Settings; diff --git a/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs b/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs index 153d4c67..2560873f 100644 --- a/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs +++ b/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs @@ -3,8 +3,7 @@ using System; using System.Linq; using System.Text.Json.Nodes; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Models.Interfaces; +using Microsoft.OpenApi; using Stef.Validation; using WireMock.Net.OpenApiParser.Extensions; using WireMock.Net.OpenApiParser.Settings; diff --git a/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj b/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj index fb454756..0d1cfad9 100644 --- a/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj +++ b/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj @@ -27,22 +27,22 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + - - + + - + diff --git a/src/WireMock.Net.OpenApiParser/WireMockOpenApiParser.cs b/src/WireMock.Net.OpenApiParser/WireMockOpenApiParser.cs index c4f16dcd..3ef51247 100644 --- a/src/WireMock.Net.OpenApiParser/WireMockOpenApiParser.cs +++ b/src/WireMock.Net.OpenApiParser/WireMockOpenApiParser.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Text; using JetBrains.Annotations; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using Microsoft.OpenApi.Reader; using Microsoft.OpenApi.YamlReader; using RamlToOpenApiConverter; diff --git a/test/WireMock.Net.Tests/WireMockServerTests.cs b/test/WireMock.Net.Tests/WireMockServerTests.cs index acd4d44d..a79fe92e 100644 --- a/test/WireMock.Net.Tests/WireMockServerTests.cs +++ b/test/WireMock.Net.Tests/WireMockServerTests.cs @@ -235,7 +235,7 @@ public partial class WireMockServerTests } #if NET8_0_OR_GREATER - [IgnoreOnContinuousIntegrationFact] + [Fact(Skip = "Does not work on local and pipeline")] public async Task WireMockServer_WithUrl0000_Should_Listen_On_All_IPs_IPv6() { // Arrange