mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-24 03:26:29 +00:00
refactor: remove redundant System.Text.Json attributes from models
The codebase uses Newtonsoft.Json (JObject.Parse + ToObject<T>) exclusively. Removed all [JsonPropertyName] attributes and [System.Text.Json.Serialization. JsonIgnore] attributes from 41 model files, along with the now-unused using System.Text.Json.Serialization imports. [JsonProperty] (Newtonsoft) attributes remain as the sole serialization annotations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PSProxmoxVE.Core.Models.Network;
|
||||
@@ -13,56 +12,48 @@ public class PveSdnSubnet
|
||||
/// <summary>
|
||||
/// The subnet CIDR (e.g. "10.0.0.0/24" or "2001:db8::/64").
|
||||
/// </summary>
|
||||
[JsonPropertyName("subnet")]
|
||||
[JsonProperty("subnet")]
|
||||
public string Subnet { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The VNet this subnet belongs to.
|
||||
/// </summary>
|
||||
[JsonPropertyName("vnet")]
|
||||
[JsonProperty("vnet")]
|
||||
public string? Vnet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The gateway IP address for this subnet.
|
||||
/// </summary>
|
||||
[JsonPropertyName("gateway")]
|
||||
[JsonProperty("gateway")]
|
||||
public string? Gateway { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether SNAT (source NAT) is enabled for this subnet.
|
||||
/// </summary>
|
||||
[JsonPropertyName("snat")]
|
||||
[JsonProperty("snat")]
|
||||
public int? Snat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The DNS zone name for this subnet.
|
||||
/// </summary>
|
||||
[JsonPropertyName("dnszoneprefix")]
|
||||
[JsonProperty("dnszoneprefix")]
|
||||
public string? DnsZonePrefix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The DHCP range configurations for automatic IP assignment.
|
||||
/// </summary>
|
||||
[JsonPropertyName("dhcp-range")]
|
||||
[JsonProperty("dhcp-range")]
|
||||
public string[]? DhcpRanges { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The subnet type identifier used internally by PVE.
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional comment or description.
|
||||
/// </summary>
|
||||
[JsonPropertyName("comments")]
|
||||
[JsonProperty("comments")]
|
||||
public string? Comments { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user