File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/Microsoft.OpenApi/Services Expand file tree Collapse file tree 1 file changed +7
-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 ;
@@ -84,16 +84,20 @@ public static class OpenApiFilterService
84
84
continue ;
85
85
}
86
86
87
+ // Add the available ops if they are in the postman collection. See path.Value
87
88
foreach ( var ops in openApiOperations )
88
89
{
89
- operationTypes . Add ( ops . Key + url ) ;
90
+ if ( path . Value . Contains ( ops . Key . ToString ( ) . ToUpper ( ) ) )
91
+ {
92
+ operationTypes . Add ( ops . Key + url ) ;
93
+ }
90
94
}
91
95
}
92
96
}
93
97
94
98
if ( ! operationTypes . Any ( ) )
95
99
{
96
- throw new ArgumentException ( "The urls in the postman collection supplied could not be found." ) ;
100
+ throw new ArgumentException ( "The urls in the Postman collection supplied could not be found." ) ;
97
101
}
98
102
99
103
// predicate for matching url and operationTypes
You can’t perform that action at this time.
0 commit comments