mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-11-27 10:52:56 +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,46 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
namespace WireMock.Net.OpenApiParser.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Error related to the Open API Document.
|
||||
/// </summary>
|
||||
public class OpenApiError
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes the <see cref="OpenApiError"/> class.
|
||||
/// </summary>
|
||||
public OpenApiError(string? pointer, string message)
|
||||
{
|
||||
Pointer = pointer;
|
||||
Message = message;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a copy of an <see cref="OpenApiError"/> object
|
||||
/// </summary>
|
||||
public OpenApiError(OpenApiError error)
|
||||
{
|
||||
Pointer = error.Pointer;
|
||||
Message = error.Message;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Message explaining the error.
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Pointer to the location of the error.
|
||||
/// </summary>
|
||||
public string? Pointer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the string representation of <see cref="OpenApiError"/>.
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
return Message + (!string.IsNullOrEmpty(Pointer) ? " [" + Pointer + "]" : "");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user