Repository navigation
fix: correct response shapes and member names that could never bind - #416
Merged
Merged
Conversation
danielabbatt
force-pushed
the
fix/response-shape-defects
branch
from
September 9, 2026 15:34
9d097af to
5349fcb
Compare
danielabbatt
force-pushed
the
chore/update-to-latest-meraki-api
branch
from
September 9, 2026 15:35
e3bc382 to
46f973a
Compare
danielabbatt
force-pushed
the
fix/response-shape-defects
branch
from
September 9, 2026 15:35
5349fcb to
8536621
Compare
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 11 |
🟢 Coverage 57.14% diff coverage · +0.45% coverage variation
Metric Results Coverage variation ✅ +0.45% coverage variation Diff coverage ✅ 57.14% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (b91f380) 7836 2683 34.24% Head commit (9d400ac) 7839 (+3) 2719 (+36) 34.69% (+0.45%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#416) 7 4 57.14% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
This was referenced Sep 9, 2026
Merged
danielabbatt
force-pushed
the
chore/update-to-latest-meraki-api
branch
from
September 29, 2026 12:15
46f973a to
e0963c8
Compare
danielabbatt
force-pushed
the
fix/response-shape-defects
branch
from
September 29, 2026 12:15
8536621 to
965af9f
Compare
danielabbatt
force-pushed
the
chore/update-to-latest-meraki-api
branch
from
September 29, 2026 12:43
e0963c8 to
47e4cac
Compare
danielabbatt
force-pushed
the
fix/response-shape-defects
branch
from
September 29, 2026 12:43
965af9f to
ad61aa9
Compare
danielabbatt
force-pushed
the
chore/update-to-latest-meraki-api
branch
from
September 29, 2026 12:52
47e4cac to
b91f380
Compare
danielabbatt
force-pushed
the
fix/response-shape-defects
branch
from
September 29, 2026 12:52
ad61aa9 to
dcef70e
Compare
An audit against the v1.74.0 OpenAPI spec (Find-ModelShapeMismatches.ps1)
found Refit methods whose declared return type disagrees with the shape the
Dashboard API sends, so the call could never deserialize, and [DataMember]
names that are misspelt, so the property never bound.
Return types corrected (breaking for callers):
List<T> where the API sends an {items, meta} wrapper (6):
GetNetworkMovesAsync -> NetworkMovesResponse
GetOrganizationCampusGatewayClustersAsync -> OrganizationCampusGatewayClustersResponse
GetOrganizationSensorGatewaysConnectionsLatestAsync -> OrganizationSensorGatewaysConnectionsLatestResponse
GetOrganizationSwitchPortsStatusesBySwitchAsync -> OrganizationSwitchPortsStatusesBySwitchResponse
GetOrganizationIntegrationsXdrNetworksAsync -> OrganizationIntegrationsXdrByNetwork (already a wrapper)
UpdateOrganizationSmSentryPoliciesAssignments -> OrganizationSmSentryPoliciesAssignmentsUpdateResponse
Single object where the API sends an array (6): now List<T> of the same T.
List<T> where the API sends a single object (10): now T, all single-resource
paths. UpdateNetworkApplianceSdwanInternetPoliciesAsync was declared as
List<SecurityEvent>, an unrelated type.
CreateNetworkMoveAsync returns NetworkMoveDetailed: the API stopped sending
networkMoveId and url, so NetworkMove is [Obsolete]. NetworkMoveDetailed gains
MoveId and Result (new NetworkMoveResult); its Status left the spec and is
nullable.
Misspellings fixed, renaming the property where it carried the typo:
occuredAt -> occurredAt, farenheit -> fahrenheit, moveLicenses -> movedLicenses,
intiator -> initiator, themeAssests -> themeAssets, address -> addresses.
Found while testing: ItemsResponseWithMeta<T> and the ItemsResponseMeta*
classes lacked [DataContract], so on every opt-in derived wrapper Newtonsoft
marked the inherited Meta as ignored and dropped the API's meta object. All
four now carry [DataContract]; pagination counts will start arriving.
Left alone as the known Meraki spec habit of documenting a list endpoint's
item rather than the array: rfProfiles, licensing entitlements, early-access
opt-ins, and five endpoints documented as an array whose only item is itself
an {items, meta} wrapper.
ResponseShapeTests covers the new shapes, the corrected names and Meta.
danielabbatt
force-pushed
the
fix/response-shape-defects
branch
from
September 29, 2026 12:56
dcef70e to
9d400ac
Compare
danielabbatt
changed the base branch from
chore/update-to-latest-meraki-api
to
main
September 29, 2026 13:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #415
Base is
chore/update-to-latest-meraki-api. Merge #415 first, then retarget this tomain. Merge both with merge commits. The changelog labels (1.74.5for #415,1.74.6for this) assume that; each merge commit adds one to the longest-path height; a squash or rebase shifts them.What
Find-ModelShapeMismatches.ps1(added in #415) found endpoints whose declared return type cannot deserialize what the Dashboard API sends, and[DataMember]names that are misspelt so the property never bound. This PR fixes every finding assessed as real. It is breaking: public return types and property names change. Each is listed in the1.74.6changelog section.List<T>where the API sends{items, meta}ItemsResponseWithMeta<T>(one already existed and was wrapped in aList)List<T>List<T>where the API sends a single object (single-resource paths)T(one wasList<SecurityEvent>, an unrelated type)NetworkMovehas neither property the API now sendsCreateNetworkMoveAsyncnow returnsNetworkMoveDetailed;NetworkMove[Obsolete];MoveId+Resultadded[DataMember]namesFound while writing the tests
ItemsResponseWithMeta<T>and the threeItemsResponseMeta*classes had no[DataContract]. Because each derived wrapper is[DataContract](opt-in), Newtonsoft marked the inheritedMetaas ignored and silently dropped the API'smetaobject, for every existing wrapper, not just the new ones. Verified by resolving the contract:Meta <- Meta ignored=True. Fixed by adding[DataContract]to all four;Meta.Countswill start being populated where it was alwaysnull.Deliberately not changed
GetNetworkWirelessRfProfilesAsyncis observed live as an array in the customer CSV).{items, meta}, where the library's wrapper is right.NetworkFirmwareUpgrade.productsflagged as a typo ofproduct: a false positive, since both exist in the spec.Callers
No code outside
Meraki.Api/InterfacesandMeraki.Api/Datareferences any changed method or property (checkedMeraki.Api,Meraki.Api.Test,Meraki.ApiChecker).Verification
The
NetworkMovesResponsetest failed first time withMeta.Counts == null, which is how the[DataContract]bug was found; it passes now. Every edited file kept its BOM and CRLF.