mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-28 20:32:13 +01:00
Use ILRepack to include Microsoft.OpenApi as internal (#1290)
* . * Use ILRepack to include Microsoft.OpenApi as internal * ... * OpenApiSpecificationVersion * . * 080 * 4
This commit is contained in:
25
src/WireMock.Net.OpenApiParser/Models/OpenApiMapper.cs
Normal file
25
src/WireMock.Net.OpenApiParser/Models/OpenApiMapper.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using System.Linq;
|
||||
using RamlToOpenApiConverter;
|
||||
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 = (OpenApiSpecificationVersion)openApiDiagnostic.SpecificationVersion
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user