Skip to content

feat: map the Appliance response members from the 1.74.0 gap report - #419

Open
danielabbatt wants to merge 1 commit into
feat/map-sm-membersfrom
feat/map-appliance-members
Open

danielabbatt wants to merge 1 commit into
feat/map-sm-membersfrom
feat/map-appliance-members

Conversation

@danielabbatt

Copy link
Copy Markdown
Contributor

Stacked on #418#417#416#415

Base is feat/map-sm-members. Merge the chain in order with merge commits, then retarget this to main. Changelog label 1.74.13 assumes that.

What

Third per-area batch from gap-report-v1.74.0.md: 18 Appliance members the spec documents that the models lacked, across 12 classes.

Member Type
AppliancePort.Sgt, Vlan.Sgt, SiteToSiteVpn.Sgt new AppliancePortSgt {id, enabled}, VlanSgt {id}, SiteToSiteVpnSgt {enabled} — the three differ in the spec
LanConfiguration.Vrf, Neighbor.Vrf, TrafficUplinkPreference.Vrf existing VlanVrf {id, name} — identical shape, reused rather than triplicated
SiteToSiteVpn.HostTranslations new SiteToSiteVpnHostTranslation {name, local, remote} + …Address
ThirdPartyVpnPeer.EcmpUplinkConfigs new ThirdPartyVpnPeerEcmpUplinkConfig {id, wan, privateSubnets, ebgpNeighbor} + …EbgpNeighbor
NetworkUmbrellaAccountConnectResponse.Umbrella new …Umbrella…Organization {id}
StaticRoute.IpVersion, ThirdPartyVpnPeerEbgpNeighbor.ReceiveLimit int?

Access follows the spec: read/update where the member is on a PUT body, read-only otherwise.

Two corrections (breaking in the type-system sense; both always came back empty)

  1. VpnStatus.ThirdPartyVpnPeers was List<ThirdPartyVpnPeers> — the configuration wrapper ({peers}), so each status entry deserialized to an object with an empty Peers. The API sends {name, publicIp, reachability}; now List<VpnStatusThirdPartyVpnPeer>.
  2. UpdateOrganizationApplianceDnsLocalRecordAsync returned OrganizationApplianceDnsLocalRecordsProfile ({id} only). The API returns the record; it now returns OrganizationApplianceDnsLocalRecordsResponse, matching the create and list methods fix: correct response shapes and member names that could never bind #416 fixed.

Verification

dotnet build Meraki.Api.slnx -c Debug   Build succeeded, 0 Error(s), 6 pre-existing CS0618 warnings
Meraki.Api.Test (Data namespace)        Total: 41, Errors: 0, Failed: 0   (7 new in ApplianceMemberTests)
Meraki.Api.Test (Workflows)             Total: 12, Errors: 0, Failed: 0

All edited files kept their BOM state and line endings. No code outside Interfaces/Data referenced the changed members.

Eighteen members the v1.74.0 spec documents that the models lacked, the
third per-area batch: Security Group Tag settings on AppliancePort, Vlan and
SiteToSiteVpn; VRF settings on LanConfiguration, Neighbor and
TrafficUplinkPreference (reusing VlanVrf, the same {id, name} shape);
SiteToSiteVpn.HostTranslations; ThirdPartyVpnPeer.EcmpUplinkConfigs;
NetworkUmbrellaAccountConnectResponse.Umbrella; StaticRoute.IpVersion;
ThirdPartyVpnPeerEbgpNeighbor.ReceiveLimit. Nine new classes back the
nested objects.

Two more members that could never bind are corrected. VpnStatus's
ThirdPartyVpnPeers list was typed as the configuration wrapper whose only
member is "peers"; each status entry is {name, publicIp, reachability} and
the list is now List<VpnStatusThirdPartyVpnPeer>.
UpdateOrganizationApplianceDnsLocalRecordAsync returned the profile type
(only "id"); it now returns OrganizationApplianceDnsLocalRecordsResponse like
the create and list methods.

ApplianceMemberTests covers the new members and both corrections.
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 high

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
Security 1 high

View in Codacy

🟢 Metrics 9 complexity

Metric Results
Complexity 9

View in Codacy

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.

Run reviewer

TIP This summary will be updated as you push new changes.

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.

1 participant