fix: map fourteen response fields the API returns - #414
Merged
Merged
Conversation
An unmapped-member export gathered from live organizations found fourteen response fields with no model property. Callers who set JsonMissingMemberHandling.ThrowOnError were getting a failed deserialization rather than an ignored field. Seven are nested objects needing new model classes: TwoPointFourGhzSettings.Dot11ax and FiveGhzSettings.Dot11ax SwitchPort.PerpetualPoe and .FastPoe NetworkApplianceSsidRadiusServer.Radsec Admin.OtherOrganizationAccounts VpnBgp.Ipv6 and .TunnelDownTermination Ten new classes back them, named after their owners in line with the existing SwitchPortDot3az / ConfigTemplateSwitchProfilePortDot3az split. Dot11ax on both bands and both PoE objects are in the v1.74.0 OpenAPI spec on request bodies as well as responses, so Dot11ax is read/write and the PoE objects are read/update, matching their endpoints. The spec also marks axEnabled deprecated in favour of dot11ax.enabled on both bands, which the XML docs now say. Radsec, OtherOrganizationAccounts, Ipv6 and TunnelDownTermination appear nowhere in the spec and are mapped read-only from the observed responses. MissingMemberNestedFieldTests covers all seven, deserializing the observed payloads with MissingMemberHandling.Error; the CI step added alongside the scalar mappings runs them. The other seven are the scalars already on main; their changelog section is merged into this one so the two batches ship as a single 1.70.138 entry rather than as labels that no longer match the built version.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Complexity | 1 medium |
🟢 Metrics 8 complexity
Metric Results Complexity 8
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 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.
Why this exists
#413 was merged into its base branch
fix/map-observed-scalar-fieldsrather than intomain, and #412 had already merged tomaina minute earlier — so the nested-object work never reachedmain. This is that commit cherry-picked onto currentmain, with the changelog reworked.What
Adds the seven nested response objects from the same unmapped-member export as #412. Callers who set
JsonMissingMemberHandling.ThrowOnErrorwere getting a failed deserialization rather than an ignored field.TwoPointFourGhzSettings.Dot11axTwoPointFourGhzSettingsDot11ax?FiveGhzSettings.Dot11axFiveGhzSettingsDot11ax?SwitchPort.PerpetualPoeSwitchPortPerpetualPoe?SwitchPort.FastPoeSwitchPortFastPoe?NetworkApplianceSsidRadiusServer.RadsecNetworkApplianceSsidRadiusServerRadsec?Admin.OtherOrganizationAccountsAdminOtherOrganizationAccounts?VpnBgp.Ipv6VpnBgpIpv6?VpnBgp.TunnelDownTerminationVpnBgpTunnelDownTermination?Ten new classes back them, each named after its owner in line with the existing
SwitchPortDot3az/ConfigTemplateSwitchProfilePortDot3azsplit rather than sharing oneenabled-only type.The spec also marks
axEnableddeprecated in favour ofdot11ax.enabledon both bands, which the XML docs now say. No behaviour change —AxEnabledstays in place.Changelog
The
1.70.135and1.70.136sections are merged into a single1.70.138section covering all fourteen fields. The old labels no longer matched anything buildable: merge commits pushedmainto1.70.136while its section said1.70.135.1.70.138is whatmainwill build as once this merges with a merge commit (this commit alone is1.70.137).Verification
Clean cherry-pick, no conflicts. Every source diff is pure addition (0 deletions), so per-file BOMs are untouched; the CHANGELOG diff is the section merge, kept CRLF.
Cleanup
fix/map-observed-scalar-fieldsstill holds#413's merge commit and can be deleted once this lands.Notes
SixGhzSettingshas nodot11axin the spec or in any observed response, so it is untouched.SwitchPort.ActiveVlansis mappedReadUpdatewhile the config-template equivalent added in fix: map seven scalar response fields the API returns #412 isRead. Neither is in the spec; still worth a follow-up decision.