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 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/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..32a173ca 100644 --- a/Meraki.Api/GlobalSuppressions.cs +++ b/Meraki.Api/GlobalSuppressions.cs @@ -7,23 +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.", - Scope = "namespaceanddescendants", - Target = "~N:Meraki.Api.Data")] - -[assembly: SuppressMessage( - "Style", - "IDE1006:Naming Styles", - Justification = "This can't be right!", + 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!; }