diff --git a/src/ServiceControl.Audit/Infrastructure/OWIN/BodyUrlRouteFix.cs b/src/ServiceControl.Audit/Infrastructure/WebApi/BodyUrlRouteFix.cs similarity index 94% rename from src/ServiceControl.Audit/Infrastructure/OWIN/BodyUrlRouteFix.cs rename to src/ServiceControl.Audit/Infrastructure/WebApi/BodyUrlRouteFix.cs index 9792811d06..52afcb4d75 100644 --- a/src/ServiceControl.Audit/Infrastructure/OWIN/BodyUrlRouteFix.cs +++ b/src/ServiceControl.Audit/Infrastructure/WebApi/BodyUrlRouteFix.cs @@ -1,4 +1,4 @@ -namespace ServiceControl.Audit.Infrastructure.OWIN +namespace ServiceControl.Audit.Infrastructure.WebApi { using System.Threading.Tasks; using Microsoft.AspNetCore.Http; diff --git a/src/ServiceControl.Audit/WebApplicationExtensions.cs b/src/ServiceControl.Audit/WebApplicationExtensions.cs index ddb62b7736..905f62da29 100644 --- a/src/ServiceControl.Audit/WebApplicationExtensions.cs +++ b/src/ServiceControl.Audit/WebApplicationExtensions.cs @@ -1,7 +1,7 @@ namespace ServiceControl.Audit; +using Infrastructure.WebApi; using Microsoft.AspNetCore.Builder; -using Infrastructure.OWIN; public static class WebApplicationExtensions { diff --git a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_queue_length_data.cs b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_queue_length_data.cs index 31e560f980..19883e5956 100644 --- a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_queue_length_data.cs +++ b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_queue_length_data.cs @@ -82,7 +82,7 @@ await Define() return false; } - // TODO this should be using camalCase (the same for a few other monitoring acceptance tests, something sounds off with the json options + // Metric names are fixed names and therefore are not following the casing rules of the chosen serializer if (monitoredEndpointDetails.Digest.Metrics.TryGetValue("QueueLength", out var queueLength) && queueLength.Average == 0.0) { return false; diff --git a/src/ServiceControl.Monitoring/Infrastructure/WebApi/UnderscoreMappingResolver.cs b/src/ServiceControl.Monitoring/Infrastructure/WebApi/UnderscoreMappingResolver.cs deleted file mode 100644 index a7ee11ba4d..0000000000 --- a/src/ServiceControl.Monitoring/Infrastructure/WebApi/UnderscoreMappingResolver.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace ServiceControl.Monitoring.Infrastructure.WebApi -{ - using System.Globalization; - using System.Text.RegularExpressions; - using Newtonsoft.Json.Serialization; - - class UnderscoreMappingResolver : DefaultContractResolver - { - protected override string ResolvePropertyName(string propertyName) - { - return Regex.Replace( - propertyName, "([A-Z])([A-Z][a-z])|([a-z0-9])([A-Z])", "$1$3_$2$4").ToLower(CultureInfo.InvariantCulture); - } - } -} \ No newline at end of file diff --git a/src/ServiceControl/Infrastructure/OWIN/BodyUrlRouteFix.cs b/src/ServiceControl/Infrastructure/WebApi/BodyUrlRouteFix.cs similarity index 95% rename from src/ServiceControl/Infrastructure/OWIN/BodyUrlRouteFix.cs rename to src/ServiceControl/Infrastructure/WebApi/BodyUrlRouteFix.cs index 8ca2a3f3d4..78a8dba4e6 100644 --- a/src/ServiceControl/Infrastructure/OWIN/BodyUrlRouteFix.cs +++ b/src/ServiceControl/Infrastructure/WebApi/BodyUrlRouteFix.cs @@ -1,4 +1,4 @@ -namespace ServiceControl.Infrastructure.OWIN +namespace ServiceControl.Infrastructure.WebApi { using System.Threading.Tasks; using Microsoft.AspNetCore.Http; diff --git a/src/ServiceControl/WebApplicationExtensions.cs b/src/ServiceControl/WebApplicationExtensions.cs index 51f202f6fd..a5ca376937 100644 --- a/src/ServiceControl/WebApplicationExtensions.cs +++ b/src/ServiceControl/WebApplicationExtensions.cs @@ -1,7 +1,7 @@ namespace ServiceControl; -using Infrastructure.OWIN; using Infrastructure.SignalR; +using Infrastructure.WebApi; using Microsoft.AspNetCore.Builder; public static class WebApplicationExtensions