File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
src/Microsoft.OpenApi.Readers Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
- // Copyright (c) Microsoft Corporation. All rights reserved.
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
// Licensed under the MIT license.
3
3
4
4
using System . Collections . Generic ;
@@ -113,11 +113,11 @@ public static IOpenApiAny LoadAny(ParseNode node)
113
113
114
114
private static IOpenApiExtension LoadExtension ( string name , ParseNode node )
115
115
{
116
- if ( node . Context . ExtensionParsers . TryGetValue ( name , out var parser ) )
116
+ if ( node . Context . ExtensionParsers . TryGetValue ( name , out var parser ) && parser (
117
+ OpenApiAnyConverter . GetSpecificOpenApiAny ( node . CreateAny ( ) ) ,
118
+ OpenApiSpecVersion . OpenApi2_0 ) is { } result )
117
119
{
118
- return parser (
119
- OpenApiAnyConverter . GetSpecificOpenApiAny ( node . CreateAny ( ) ) ,
120
- OpenApiSpecVersion . OpenApi2_0 ) ;
120
+ return result ;
121
121
}
122
122
else
123
123
{
Original file line number Diff line number Diff line change @@ -171,11 +171,11 @@ public static IOpenApiAny LoadAny(ParseNode node)
171
171
172
172
private static IOpenApiExtension LoadExtension ( string name , ParseNode node )
173
173
{
174
- if ( node . Context . ExtensionParsers . TryGetValue ( name , out var parser ) )
174
+ if ( node . Context . ExtensionParsers . TryGetValue ( name , out var parser ) && parser (
175
+ OpenApiAnyConverter . GetSpecificOpenApiAny ( node . CreateAny ( ) ) ,
176
+ OpenApiSpecVersion . OpenApi3_0 ) is { } result )
175
177
{
176
- return parser (
177
- OpenApiAnyConverter . GetSpecificOpenApiAny ( node . CreateAny ( ) ) ,
178
- OpenApiSpecVersion . OpenApi3_0 ) ;
178
+ return result ;
179
179
}
180
180
else
181
181
{
You can’t perform that action at this time.
0 commit comments