diff --git a/dev-proxy-plugins/RequestLogs/OpenApiSpecGeneratorPlugin.cs b/dev-proxy-plugins/RequestLogs/OpenApiSpecGeneratorPlugin.cs index e861f2e7..35d7f36a 100644 --- a/dev-proxy-plugins/RequestLogs/OpenApiSpecGeneratorPlugin.cs +++ b/dev-proxy-plugins/RequestLogs/OpenApiSpecGeneratorPlugin.cs @@ -583,6 +583,12 @@ private void SetResponseFromSession(OpenApiOperation operation, Response respons continue; } + if (openApiResponse.Headers.ContainsKey(header.Name)) + { + _logger?.LogDebug(" Header {headerName} already exists in response", header.Name); + continue; + } + openApiResponse.Headers.Add(header.Name, new OpenApiHeader { Schema = new OpenApiSchema { Type = "string" }