We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c01fbe commit 8683e37Copy full SHA for 8683e37
src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs
@@ -1,4 +1,4 @@
1
-// Copyright (c) Microsoft Corporation. All rights reserved.
+// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the MIT license.
3
4
using System;
@@ -88,7 +88,14 @@ public OpenApiReference ConvertToOpenApiReference(
88
if (reference.StartsWith("#"))
89
{
90
// "$ref": "#/components/schemas/Pet"
91
- return ParseLocalReference(segments[1]);
+ try
92
+ {
93
+ return ParseLocalReference(segments[1]);
94
+ }
95
+ catch (OpenApiException)
96
97
+ return null;
98
99
}
100
// Where fragments point into a non-OpenAPI document, the id will be the complete fragment identifier
101
string id = segments[1];
0 commit comments