Revert to RamlToOpenApiConverter.SourceOnly (#1509)

This commit is contained in:
Stef Heyenrath authored and GitHub committed 2026-09-21 20:50:49 +02:00
1 parent e4389333a1
commit 7db5b562d8
16 files changed
+176 -17

No files matched your search

@@ -0,0 +1,23 @@
// Copyright © WireMock.Net
using MicrosoftOpenApiDiagnostic = Microsoft.OpenApi.Reader.OpenApiDiagnostic;
namespace WireMock.Net.OpenApiParser.Models;
internal static class OpenApiMapper
{
internal static OpenApiDiagnostic? Map(MicrosoftOpenApiDiagnostic? openApiDiagnostic)
{
if (openApiDiagnostic == null)
{
return null;
}
return new OpenApiDiagnostic
{
Errors = openApiDiagnostic.Errors.Select(e => new OpenApiError(e.Pointer, e.Message)).ToList(),
Warnings = openApiDiagnostic.Warnings.Select(e => new OpenApiError(e.Pointer, e.Message)).ToList(),
SpecificationVersion = (OpenApiSpecVersion)openApiDiagnostic.SpecificationVersion
};
}
}