Skip to content

Conversation

@danielabbatt
Copy link
Contributor

No description provided.

@danielabbatt danielabbatt requested review from Copilot and stashjones and removed request for Copilot October 21, 2025 10:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Meraki.Api library to support API version 1.63.0, introducing comprehensive wireless MQTT settings management capabilities. The update adds endpoints for retrieving and updating organization-level wireless MQTT configurations, including settings for MQTT brokers, BLE devices, and Wi-Fi clients.

Key Changes:

  • Added new GET and PUT endpoints for organization wireless MQTT settings with pagination support
  • Created 16 new data models to represent the hierarchical MQTT settings structure (including MQTT, BLE, and Wi-Fi configurations)
  • Implemented extension method for automatic pagination of MQTT settings

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
version.json Updated version from 1.62 to 1.63
OrganizationsWirelessSection.cs Added Mqtt property to expose MQTT settings interface
IOrganizationsWirelessMqtt.cs New interface defining GET and PUT operations for wireless MQTT settings
IOrganizationsWirelessMqttExtensions.cs Extension method for retrieving all paginated MQTT settings
OrganizationWirelessMqttSettings.cs Main model containing network, MQTT, BLE, and Wi-Fi settings
OrganizationWirelessMqttSettingsMqtt.cs MQTT configuration model with topic, broker, and publishing settings
OrganizationWirelessMqttSettingsMqttPublishing.cs Publishing frequency and QoS configuration
OrganizationWirelessMqttSettingsMqttBroker.cs Broker reference model
OrganizationWirelessMqttSettingsBle.cs BLE settings including type, flush, and hysteresis
OrganizationWirelessMqttSettingsBleFlush.cs BLE flush frequency configuration
OrganizationWirelessMqttSettingsBleAllowLists.cs BLE UUID and MAC allow lists
OrganizationWirelessMqttSettingsBleHysteresis.cs BLE hysteresis threshold settings
OrganizationWirelessMqttSettingsWifi.cs Wi-Fi settings including client type and hysteresis
OrganizationWirelessMqttSettingsWifiFlush.cs Wi-Fi flush frequency configuration
OrganizationWirelessMqttSettingsWifiAllowLists.cs Wi-Fi MAC address allow lists
OrganizationWirelessMqttSettingsWifiHysteresis.cs Wi-Fi hysteresis threshold settings
OrganizationWirelessMqttSettingsResponse.cs Paginated response wrapper with items and metadata
OrganizationWirelessMqttSettingsResponseMeta.cs Metadata for pagination
OrganizationWirelessMqttSettingsResponseMetaCounts.cs Count information for paginated results
OrganizationWirelessMqttSettingsResponseMetaCountsItems.cs Total and remaining item counts
OrganizationWirelessMqttSettingsNetwork.cs Network information model
OrganizationWirelessMqttSettingsUpdateRequest.cs Request model for PUT operations
CHANGELOG.md Documented all changes for v1.63.0

CancellationToken cancellationToken = default);

/// <summary>
/// Add new broker config for wireless MQTT
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XML summary states 'Add new broker config' but the method actually updates existing settings, not just adds a broker. Consider revising to 'Update wireless MQTT settings including broker configuration' to more accurately reflect that this is a general update operation.

Suggested change
/// Add new broker config for wireless MQTT
/// Update wireless MQTT settings including broker configuration

Copilot uses AI. Check for mistakes.
[Get("/organizations/{organizationId}/wireless/mqtt/settings")]
Task<OrganizationWirelessMqttSettingsResponse> GetOrganizationWirelessMqttSettingsAsync(
string organizationId,
int? perPage = null,
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The perPage parameter should use [AliasAs("perPage")] attribute for consistency with query parameter naming conventions, even though the C# name matches the API parameter name.

Suggested change
int? perPage = null,
[AliasAs("perPage")] int? perPage = null,

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +24
string? startingAfter = null,
string? endingBefore = null,
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The startingAfter and endingBefore parameters should use [AliasAs] attributes (e.g., [AliasAs("startingAfter")] and [AliasAs("endingBefore")]) for consistency with the project's Refit conventions for query parameters.

Copilot uses AI. Check for mistakes.
List<string>? networkIds = null,
CancellationToken cancellationToken = default)
=> MerakiClient.GetAllFromResponsePropertyAsync(
(startingAfter, endingBefore, cancellationToken) =>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: 'endingBefore' is not used. Use discard parameter instead.

The issue identified by the SonarC# linter is that the parameter endingBefore is declared in the lambda expression but is not used within the body of that lambda. In C#, when a parameter is not used, it's a good practice to use a discard parameter (denoted by an underscore _) to indicate that the parameter is intentionally ignored.

To fix the issue, you can replace endingBefore with _ in the lambda expression. Here’s the suggested change:

Suggested change
(startingAfter, endingBefore, cancellationToken) =>
(startingAfter, _, cancellationToken) =>

This comment was generated by an experimental AI tool.

@danielabbatt danielabbatt merged commit 58346ce into main Oct 21, 2025
2 of 3 checks passed
@danielabbatt danielabbatt deleted the feature/1.63 branch October 21, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants