Skip to content

Commit 4f55597

Browse files
committed
chore: exposes unused property so consumers can read the information
Signed-off-by: Vincent Biret <[email protected]>
1 parent 8bf3fbe commit 4f55597

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Microsoft.OpenApi/Services/OpenApiReferenceError.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ namespace Microsoft.OpenApi.Services
1111
/// </summary>
1212
public class OpenApiReferenceError : OpenApiError
1313
{
14-
private OpenApiReference _reference;
14+
/// <summary>
15+
/// The reference that caused the error.
16+
/// </summary>
17+
public readonly OpenApiReference Reference;
1518
/// <summary>
1619
/// Initializes the <see cref="OpenApiError"/> class using the message and pointer from the given exception.
1720
/// </summary>
@@ -26,7 +29,7 @@ public OpenApiReferenceError(OpenApiException exception) : base(exception.Pointe
2629
/// <param name="message"></param>
2730
public OpenApiReferenceError(OpenApiReference reference, string message) : base("", message)
2831
{
29-
_reference = reference;
32+
Reference = reference;
3033
}
3134
}
3235
}

0 commit comments

Comments
 (0)