From 2f5a412d6a27eac5621abf86172792e7a0a1d1cf Mon Sep 17 00:00:00 2001 From: Daniel Abbatt Date: Sat, 18 Apr 2026 18:13:04 +0100 Subject: [PATCH 1/3] Ignore Claude Code local settings file --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 3001c1ee..986828ff 100644 --- a/.gitignore +++ b/.gitignore @@ -337,3 +337,6 @@ appsettings.json /Early Access Features/Push API.postman_collection.json tmpclaude-*-cwd + +# Claude Code local settings +.claude/settings.local.json From a13bb87136879a607999513ca195a7eb8980d5d4 Mon Sep 17 00:00:00 2001 From: Daniel Abbatt Date: Sat, 18 Apr 2026 18:13:04 +0100 Subject: [PATCH 2/3] Rename camelCase DTO properties to PascalCase Eleven public DTO properties were written in camelCase, bypassing the project's convention of PascalCase C# names with [DataMember(Name = "...")] attributes preserving the wire format. An assembly-wide IDE1006 suppression was masking them. Renamed the properties, wire names unchanged via existing DataMember attributes, and removed the blanket suppression. This is a source-breaking change for consumers that read the old names (e.g. obj.networkId -> obj.NetworkId). --- Meraki.Api/Data/Authorization.cs | 2 +- Meraki.Api/Data/CameraCustomAnalyticsParameters.cs | 2 +- Meraki.Api/Data/ClientOverview.cs | 2 +- Meraki.Api/Data/ClientPolicyPolicyBySsid.cs | 2 +- Meraki.Api/Data/LinkLayerNodeDiscoveredLldp.cs | 2 +- Meraki.Api/Data/MerakiVpnPeers.cs | 2 +- .../Data/NetworkCellularGatewayEsimsInventoryItem.cs | 2 +- ...tionAssuranceAlertsOverviewHistoricalItemByAlertType.cs | 2 +- Meraki.Api/Data/SecureConnectDestinationList.cs | 2 +- .../SecureConnectTunnelClientAuthenticationParameters.cs | 2 +- Meraki.Api/Data/VpnStats.cs | 2 +- Meraki.Api/GlobalSuppressions.cs | 7 ------- 12 files changed, 11 insertions(+), 18 deletions(-) diff --git a/Meraki.Api/Data/Authorization.cs b/Meraki.Api/Data/Authorization.cs index fa1fb22b..d71a0549 100644 --- a/Meraki.Api/Data/Authorization.cs +++ b/Meraki.Api/Data/Authorization.cs @@ -39,5 +39,5 @@ public class Authorization /// [ApiAccess(ApiAccess.Read)] [DataMember(Name = "authorizedByEmail")] - public string authorizedByEmail { get; set; } = string.Empty; + public string AuthorizedByEmail { get; set; } = string.Empty; } diff --git a/Meraki.Api/Data/CameraCustomAnalyticsParameters.cs b/Meraki.Api/Data/CameraCustomAnalyticsParameters.cs index c857cf0f..bf3d6de0 100644 --- a/Meraki.Api/Data/CameraCustomAnalyticsParameters.cs +++ b/Meraki.Api/Data/CameraCustomAnalyticsParameters.cs @@ -11,5 +11,5 @@ public class CameraCustomAnalyticsParameters : NamedItem /// [ApiAccess(ApiAccess.ReadUpdate)] [DataMember(Name = "value")] - public string value { get; set; } = string.Empty; + public string Value { get; set; } = string.Empty; } diff --git a/Meraki.Api/Data/ClientOverview.cs b/Meraki.Api/Data/ClientOverview.cs index 7631011a..f787ec02 100644 --- a/Meraki.Api/Data/ClientOverview.cs +++ b/Meraki.Api/Data/ClientOverview.cs @@ -9,7 +9,7 @@ public class ClientOverview /// Usage /// [DataMember(Name = "usage")] - public ClientOverviewUsage usage { get; set; } = new(); + public ClientOverviewUsage Usage { get; set; } = new(); /// /// Counts diff --git a/Meraki.Api/Data/ClientPolicyPolicyBySsid.cs b/Meraki.Api/Data/ClientPolicyPolicyBySsid.cs index 300838a9..07992db6 100644 --- a/Meraki.Api/Data/ClientPolicyPolicyBySsid.cs +++ b/Meraki.Api/Data/ClientPolicyPolicyBySsid.cs @@ -25,5 +25,5 @@ public class ClientPolicyPolicyBySsid /// [ApiAccess(ApiAccess.ReadUpdate)] [DataMember(Name = "groupPolicyId")] - public string groupPolicyId { get; set; } = string.Empty; + public string GroupPolicyId { get; set; } = string.Empty; } diff --git a/Meraki.Api/Data/LinkLayerNodeDiscoveredLldp.cs b/Meraki.Api/Data/LinkLayerNodeDiscoveredLldp.cs index a1286ace..f3c72424 100644 --- a/Meraki.Api/Data/LinkLayerNodeDiscoveredLldp.cs +++ b/Meraki.Api/Data/LinkLayerNodeDiscoveredLldp.cs @@ -34,7 +34,7 @@ public class LinkLayerNodeDiscoveredLldp /// Management address /// [DataMember(Name = "managementAddress")] - public string managementAddress { get; set; } = string.Empty; + public string ManagementAddress { get; set; } = string.Empty; /// /// Port id diff --git a/Meraki.Api/Data/MerakiVpnPeers.cs b/Meraki.Api/Data/MerakiVpnPeers.cs index 1b8304c3..753f1e84 100644 --- a/Meraki.Api/Data/MerakiVpnPeers.cs +++ b/Meraki.Api/Data/MerakiVpnPeers.cs @@ -10,7 +10,7 @@ public class MerakiVpnPeers /// NetworkId /// [DataMember(Name = "networkId")] - public string networkId { get; set; } = string.Empty; + public string NetworkId { get; set; } = string.Empty; /// /// Network name diff --git a/Meraki.Api/Data/NetworkCellularGatewayEsimsInventoryItem.cs b/Meraki.Api/Data/NetworkCellularGatewayEsimsInventoryItem.cs index 20bafb24..ccb8d874 100644 --- a/Meraki.Api/Data/NetworkCellularGatewayEsimsInventoryItem.cs +++ b/Meraki.Api/Data/NetworkCellularGatewayEsimsInventoryItem.cs @@ -19,7 +19,7 @@ public class NetworkCellularGatewayEsimsInventoryItem /// [ApiAccess(ApiAccess.Read)] [DataMember(Name = "lastUpdatedAt")] - public string lastUpdatedAt { get; set; } = string.Empty; + public string LastUpdatedAt { get; set; } = string.Empty; /// /// Whether eSIM is currently active SIM on Device diff --git a/Meraki.Api/Data/OrganizationAssuranceAlertsOverviewHistoricalItemByAlertType.cs b/Meraki.Api/Data/OrganizationAssuranceAlertsOverviewHistoricalItemByAlertType.cs index e07fb410..f2a42002 100644 --- a/Meraki.Api/Data/OrganizationAssuranceAlertsOverviewHistoricalItemByAlertType.cs +++ b/Meraki.Api/Data/OrganizationAssuranceAlertsOverviewHistoricalItemByAlertType.cs @@ -32,5 +32,5 @@ public class OrganizationAssuranceAlertsOverviewHistoricalItemByAlertType /// [ApiAccess(ApiAccess.Read)] [DataMember(Name = "type")] - public string type { get; set; } = string.Empty; + public string Type { get; set; } = string.Empty; } diff --git a/Meraki.Api/Data/SecureConnectDestinationList.cs b/Meraki.Api/Data/SecureConnectDestinationList.cs index 9749b0cb..bd610663 100644 --- a/Meraki.Api/Data/SecureConnectDestinationList.cs +++ b/Meraki.Api/Data/SecureConnectDestinationList.cs @@ -36,7 +36,7 @@ public class SecureConnectDestinationList /// [ApiAccess(ApiAccess.Read)] [DataMember(Name = "modifiedAt")] - public DateTime modifiedAt { get; set; } + public DateTime ModifiedAt { get; set; } /// /// The organization ID. diff --git a/Meraki.Api/Data/SecureConnectTunnelClientAuthenticationParameters.cs b/Meraki.Api/Data/SecureConnectTunnelClientAuthenticationParameters.cs index 0ca7b0bc..6e86d1f5 100644 --- a/Meraki.Api/Data/SecureConnectTunnelClientAuthenticationParameters.cs +++ b/Meraki.Api/Data/SecureConnectTunnelClientAuthenticationParameters.cs @@ -18,5 +18,5 @@ public class SecureConnectTunnelClientAuthenticationParameters /// [ApiAccess(ApiAccess.Read)] [DataMember(Name = "modifiedAt")] - public DateTime modifiedAt { get; set; } + public DateTime ModifiedAt { get; set; } } diff --git a/Meraki.Api/Data/VpnStats.cs b/Meraki.Api/Data/VpnStats.cs index fc826e43..6d2c0ec1 100644 --- a/Meraki.Api/Data/VpnStats.cs +++ b/Meraki.Api/Data/VpnStats.cs @@ -10,7 +10,7 @@ public class VpnStats /// NetworkId /// [DataMember(Name = "networkId")] - public string networkId { get; set; } = string.Empty; + public string NetworkId { get; set; } = string.Empty; /// /// Network name diff --git a/Meraki.Api/GlobalSuppressions.cs b/Meraki.Api/GlobalSuppressions.cs index d5e334ff..9ad23d37 100644 --- a/Meraki.Api/GlobalSuppressions.cs +++ b/Meraki.Api/GlobalSuppressions.cs @@ -20,13 +20,6 @@ Scope = "namespaceanddescendants", Target = "~N:Meraki.Api.Data")] -[assembly: SuppressMessage( - "Style", - "IDE1006:Naming Styles", - Justification = "This can't be right!", - Scope = "namespaceanddescendants", - Target = "~N:Meraki.Api.Data")] - [assembly: SuppressMessage( "Globalization", "CA1303:Do not pass literals as localized parameters", From b1915da3b2a81d5007146d065c9bbd273b7256b8 Mon Sep 17 00:00:00 2001 From: Daniel Abbatt Date: Sat, 18 Apr 2026 18:21:24 +0100 Subject: [PATCH 3/3] Tidy suppressions, dead code, and document DTO naming - Remove redundant CA1848 suppression scoped to Meraki.Api.Data; the broader Meraki.Api-scoped suppression already covers it via namespaceanddescendants. This also removes a stale "TODO - remove this suppression" justification. - Delete two commented-out properties in SecureConnectDeploymentsSection that had no rationale; git history keeps them if they're ever needed. - Add a "DTO property naming" section to CONTRIBUTING.md documenting PascalCase C# names with [DataMember(Name = "camelCase")] attributes. - Fix a "deserilize" typo in the CA1056 suppression justification. --- CONTRIBUTING.md | 16 ++++++++++++++++ Meraki.Api/GlobalSuppressions.cs | 8 +------- .../SecureConnectDeploymentsSection.cs | 5 +---- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e02ff352..9af5d440 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -127,6 +127,22 @@ CellularGateway, The first entry should be set to a value of 1 so that deserialization of unknown values will result in defaulting to 0 which has no valid value in the enum. +## DTO property naming + +DTO properties use PascalCase C# names. The Meraki API's camelCase wire format +is preserved by a `[DataMember(Name = "camelCaseName")]` attribute on each +property. For example: + +```c# +[DataMember(Name = "networkId")] +public string NetworkId { get; set; } = string.Empty; +``` + +Do not define public properties directly in camelCase — this breaks consumer +ergonomics (no `IntelliSense` match for the C# convention) and trips IDE1006. +The analyzer is intentionally *not* suppressed, so stragglers will fail the +build. + ## API Attributes To assist with understanding at runtime, all models which are used as a response body should be decorated to indicate which returned properties can be used as part of create/update/delete requests. diff --git a/Meraki.Api/GlobalSuppressions.cs b/Meraki.Api/GlobalSuppressions.cs index 9ad23d37..32a173ca 100644 --- a/Meraki.Api/GlobalSuppressions.cs +++ b/Meraki.Api/GlobalSuppressions.cs @@ -7,16 +7,10 @@ [assembly: CLSCompliant(true)] -[assembly: SuppressMessage( - "Performance", "CA1848:Use the LoggerMessage delegates", - Justification = "TODO - remove this suppression.", - Scope = "namespaceanddescendants", - Target = "~N:Meraki.Api.Data") -] [assembly: SuppressMessage( "Design", "CA1056:Uri properties should not be strings", - Justification = "Uri would not deserilize properly.", + Justification = "Uri would not deserialize properly.", Scope = "namespaceanddescendants", Target = "~N:Meraki.Api.Data")] diff --git a/Meraki.Api/Sections/SecureConnect/SecureConnectDeploymentsSection.cs b/Meraki.Api/Sections/SecureConnect/SecureConnectDeploymentsSection.cs index c5050614..361763b7 100644 --- a/Meraki.Api/Sections/SecureConnect/SecureConnectDeploymentsSection.cs +++ b/Meraki.Api/Sections/SecureConnect/SecureConnectDeploymentsSection.cs @@ -6,16 +6,13 @@ namespace Meraki.Api.Sections.SecureConnect; /// public class SecureConnectDeploymentsSection { - //public ISecureConnectDeploymentsDataCenter DataCenter { get; internal set; } = null!; /// /// List the network devices. /// - public ISecureConnectDeploymentsNetworkDevices NetworkDevices { get; internal set; } = null!; + /// /// List the tunnels for an organization. /// - public ISecureConnectDeploymentsOrganizationTunnel OrganizationTunnel { get; internal set; } = null!; - //public ISecureConnectDeploymentsPolicy Policy { get; internal set; } = null!; }