Skip to content

Commit 12e4ff4

Browse files
Merge remote-tracking branch 'origin/alert-autofix-210' into staging
2 parents 18fd16a + baf9983 commit 12e4ff4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

OpenReferralApi.Core/Services/OpenApiValidationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public async Task<OpenApiValidationResult> ValidateOpenApiSpecificationAsync(Ope
5454
var (discoveredUrl, reason) = await _discoveryService.DiscoverOpenApiUrlAsync(request.BaseUrl, cancellationToken);
5555
if (!string.IsNullOrEmpty(discoveredUrl))
5656
{
57-
_logger.LogInformation("Discovered OpenAPI schema URL: {Url} (Reason: {Reason})", discoveredUrl, reason);
57+
_logger.LogInformation("Discovered OpenAPI schema URL: {Url} (Reason: {Reason})", SchemaResolverService.SanitizeUrlForLogging(discoveredUrl), reason);
5858
request.OpenApiSchema ??= new OpenApiSchema();
5959
request.OpenApiSchema.Url = discoveredUrl;
6060
request.ProfileReason = reason;

OpenReferralApi.Core/Services/SchemaResolverService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,13 +630,13 @@ public async Task<JSchema> CreateSchemaFromJsonAsync(string schemaJson, string?
630630
{
631631
try
632632
{
633-
_logger.LogDebug("Creating JSON schema from JSON string with resolver. DocumentUri: {DocumentUri}", documentUri ?? "none");
633+
_logger.LogDebug("Creating JSON schema from JSON string with resolver. DocumentUri: {DocumentUri}", documentUri != null ? SanitizeUrlForLogging(documentUri) : "none");
634634

635635
// Pre-resolve all external and internal references using System.Text.Json based resolution
636636
string resolvedSchemaJson = schemaJson;
637637
try
638638
{
639-
_logger.LogDebug("Pre-resolving all schema references with base URI: {DocumentUri}", documentUri ?? "none");
639+
_logger.LogDebug("Pre-resolving all schema references with base URI: {DocumentUri}", documentUri != null ? SanitizeUrlForLogging(documentUri) : "none");
640640
resolvedSchemaJson = await ResolveAsync(schemaJson, documentUri, auth);
641641
_logger.LogDebug("Successfully pre-resolved all schema references");
642642
}

0 commit comments

Comments
 (0)