mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-11-23 08:44:25 +01:00
Revert to RamlToOpenApiConverter.SourceOnly (#1509)
This commit is contained in:
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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user