File tree Expand file tree Collapse file tree 4 files changed +26
-24
lines changed
src/Microsoft.OpenApi.Readers Expand file tree Collapse file tree 4 files changed +26
-24
lines changed Original file line number Diff line number Diff line change @@ -230,18 +230,6 @@ private static void FixRequestBodyReferences(OpenApiDocument doc)
230
230
walker . Walk ( doc ) ;
231
231
}
232
232
}
233
-
234
- internal static IOpenApiExtension LoadExtension ( string name , ParseNode node )
235
- {
236
- if ( node . Context . ExtensionParsers . TryGetValue ( name , out var parser ) )
237
- {
238
- return parser ( node . CreateAny ( ) ) ;
239
- }
240
- else
241
- {
242
- return node . CreateAny ( ) ;
243
- }
244
- }
245
233
}
246
234
247
235
internal class RequestBodyReferenceFixer : OpenApiVisitorBase
Original file line number Diff line number Diff line change 4
4
using System . Collections . Generic ;
5
5
using System . Linq ;
6
6
using Microsoft . OpenApi . Any ;
7
+ using Microsoft . OpenApi . Interfaces ;
7
8
using Microsoft . OpenApi . Readers . ParseNodes ;
8
9
9
10
namespace Microsoft . OpenApi . Readers . V2
@@ -38,6 +39,18 @@ public static IOpenApiAny LoadAny(ParseNode node)
38
39
return node . CreateAny ( ) ;
39
40
}
40
41
42
+ private static IOpenApiExtension LoadExtension ( string name , ParseNode node )
43
+ {
44
+ if ( node . Context . ExtensionParsers . TryGetValue ( name , out var parser ) )
45
+ {
46
+ return parser ( node . CreateAny ( ) ) ;
47
+ }
48
+ else
49
+ {
50
+ return node . CreateAny ( ) ;
51
+ }
52
+ }
53
+
41
54
private static string LoadString ( ParseNode node )
42
55
{
43
56
return node . GetScalarValue ( ) ;
Original file line number Diff line number Diff line change @@ -57,17 +57,5 @@ public static OpenApiDocument LoadOpenApi(RootNode rootNode)
57
57
58
58
return openApidoc ;
59
59
}
60
-
61
-
62
- internal static IOpenApiExtension LoadExtension ( string name , ParseNode node )
63
- {
64
- if ( node . Context . ExtensionParsers . TryGetValue ( name , out var parser ) ) {
65
- return parser ( node . CreateAny ( ) ) ;
66
- }
67
- else
68
- {
69
- return node . CreateAny ( ) ;
70
- }
71
- }
72
60
}
73
61
}
Original file line number Diff line number Diff line change 5
5
using System . Linq ;
6
6
using Microsoft . OpenApi . Any ;
7
7
using Microsoft . OpenApi . Expressions ;
8
+ using Microsoft . OpenApi . Interfaces ;
8
9
using Microsoft . OpenApi . Models ;
9
10
using Microsoft . OpenApi . Readers . ParseNodes ;
10
11
@@ -63,6 +64,18 @@ public static IOpenApiAny LoadAny(ParseNode node)
63
64
return node . CreateAny ( ) ;
64
65
}
65
66
67
+ private static IOpenApiExtension LoadExtension ( string name , ParseNode node )
68
+ {
69
+ if ( node . Context . ExtensionParsers . TryGetValue ( name , out var parser ) )
70
+ {
71
+ return parser ( node . CreateAny ( ) ) ;
72
+ }
73
+ else
74
+ {
75
+ return node . CreateAny ( ) ;
76
+ }
77
+ }
78
+
66
79
private static string LoadString ( ParseNode node )
67
80
{
68
81
return node . GetScalarValue ( ) ;
You can’t perform that action at this time.
0 commit comments