-
Notifications
You must be signed in to change notification settings - Fork 275
Expand file tree
/
Copy pathOpenApiReferenceError.cs
More file actions
35 lines (32 loc) · 1.04 KB
/
OpenApiReferenceError.cs
File metadata and controls
35 lines (32 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using Microsoft.OpenApi.Exceptions;
using Microsoft.OpenApi.Models;
namespace Microsoft.OpenApi.Services
{
/// <summary>
///
/// </summary>
public class OpenApiReferenceError : OpenApiError
{
/// <summary>
/// The reference that caused the error.
/// </summary>
public readonly OpenApiReference Reference;
/// <summary>
/// Initializes the <see cref="OpenApiError"/> class using the message and pointer from the given exception.
/// </summary>
public OpenApiReferenceError(OpenApiException exception) : base(exception.Pointer, exception.Message)
{
}
/// <summary>
///
/// </summary>
/// <param name="reference"></param>
/// <param name="message"></param>
public OpenApiReferenceError(OpenApiReference reference, string message) : base("", message)
{
Reference = reference;
}
}
}