File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/Microsoft.OpenApi.Hidi Expand file tree Collapse file tree 1 file changed +9
-3
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 ;
@@ -46,16 +46,22 @@ public static void ProcessOpenApiDocument(
46
46
}
47
47
48
48
var stream = GetStream ( input ) ;
49
+ OpenApiDocument document ;
50
+
51
+ if ( input . Contains ( "xml" ) )
52
+ {
53
+ document = ConvertCsdlToOpenApi ( stream ) ;
54
+ }
55
+
49
56
var result = new OpenApiStreamReader ( new OpenApiReaderSettings
50
57
{
51
58
ReferenceResolution = resolveExternal ? ReferenceResolutionSetting . ResolveAllReferences : ReferenceResolutionSetting . ResolveLocalReferences ,
52
59
RuleSet = ValidationRuleSet . GetDefaultRuleSet ( )
53
60
}
54
61
) . ReadAsync ( stream ) . GetAwaiter ( ) . GetResult ( ) ;
55
62
56
- OpenApiDocument document ;
57
63
document = result . OpenApiDocument ;
58
-
64
+
59
65
// Check if filter options are provided, then execute
60
66
if ( ! string . IsNullOrEmpty ( filterByOperationIds ) && ! string . IsNullOrEmpty ( filterByTags ) )
61
67
{
You can’t perform that action at this time.
0 commit comments