Commit Graph
2 Commits
Author SHA1 Message Date
Adam NadrowskiandClaude Opus 4.6 1baee2070f fix: add omitempty to Network string fields to prevent sending empty values
Network create/update requests were sending empty strings for unset fields
(firewall_zone_id, radiusprofile_id, usergroup_id, dhcpd_dns_*, wan_dns*,
and 20+ others) because their JSON struct tags lacked omitempty. The UniFi
controller interprets an explicit empty firewall_zone_id as a zone
disassociation, which triggers a global zone rebuild that causes all zone
policies to disappear from the UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 23:00:02 -05:00
shadyeipandClaude Opus 4.5 74c1746ff5 feat: add network_ids support to FirewallZonePolicyDestination
- Add NetworkIDs and MatchOppositeNetworks fields to destination struct
- Add NETWORK to MatchingTarget validation for destination
- Update codegen schema to include destination network targeting
- Add AggregateNumPorts to DevicePortOverrides (compatibility fix)

This enables firewall zone policies to target specific destination
networks, matching the existing source.network_ids functionality.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:26:28 -05:00