From 5f76f8b9680dfb13cb95a6d608ae1e9c2c2f0780 Mon Sep 17 00:00:00 2001 From: Waldek Mastykarz Date: Tue, 21 May 2024 18:42:59 +0200 Subject: [PATCH] Fixes matching APIs in ApiCenterOnboardingPlugin (#732) --- dev-proxy-plugins/RequestLogs/ApiCenterOnboardingPlugin.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev-proxy-plugins/RequestLogs/ApiCenterOnboardingPlugin.cs b/dev-proxy-plugins/RequestLogs/ApiCenterOnboardingPlugin.cs index 9955ef4e..b493a0db 100644 --- a/dev-proxy-plugins/RequestLogs/ApiCenterOnboardingPlugin.cs +++ b/dev-proxy-plugins/RequestLogs/ApiCenterOnboardingPlugin.cs @@ -439,7 +439,8 @@ async Task ImportApiDefinition(string apiDefinitionId, string openApiSpecFilePat var serverUrl = new Uri(server.Url); var serverPath = serverUrl.AbsolutePath.TrimEnd('/'); - var urlPathFromRequest = requestUrl.Replace(server.Url.TrimEnd('/'), "", StringComparison.OrdinalIgnoreCase); + var requestUri = new Uri(requestUrl); + var urlPathFromRequest = requestUri.GetLeftPart(UriPartial.Path).Replace(server.Url.TrimEnd('/'), "", StringComparison.OrdinalIgnoreCase); foreach (var path in openApiDocument.Paths) {