You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 78203e9
Browse filesBrowse the repository at this point in the historyBrowse files
Exclude non-relative OpenAPI paths from selection and cover base-path reconciliation
Extend the Python parser to exclude absolute or authority-changing operation paths (for example
"https://another-host/admin") before the selection predicate is consulted, so selection and request
construction share one canonical target. The .NET OpenAPI reader already rejects such non-relative
path keys during parsing, so a regression test locks that in rather than adding an unreachable check.
Add the missing test coverage for the base-path reconciliation branch, which rejects a same-authority
request whose canonical path escapes the configured server base path, in both the .NET and Python
request builders.
Copy file name to clipboardExpand all lines: dotnet/src/Functions/Functions.OpenApi/OpenApi/OpenApiDocumentParser.cs
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -200,7 +200,9 @@ internal static List<RestApiOperation> CreateRestApiOperations(OpenApiDocument d
200
200
// Exclude operations whose path contains an encoded or literal dot-segment before the
201
201
// selection predicate is consulted. Such a path is canonicalized into a different
202
202
// effective endpoint at request time, so offering it to an include/exclude predicate
203
-
// would let an encoded dot-segment bypass the operation-selection filter.
203
+
// would let an encoded dot-segment bypass the operation-selection filter. Absolute or
204
+
// authority-changing path keys are already rejected by the OpenAPI reader, so a
205
+
// dot-segment check is sufficient here.
204
206
if(RestApiOperation.ContainsDotSegment(path))
205
207
{
206
208
logger.LogWarning("Operation '{OperationId}' at path '{Path}' contains a dot-segment and will be skipped during operation selection.",operationItem.OperationId,path);
0 commit comments