mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-22 10:46:37 +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.Users;
|
||||
@@ -12,7 +11,6 @@ public class PveRole
|
||||
/// <summary>
|
||||
/// The unique role identifier (e.g., "Administrator", "PVEVMAdmin", "PVEDatastoreUser").
|
||||
/// </summary>
|
||||
[JsonPropertyName("roleid")]
|
||||
[JsonProperty("roleid")]
|
||||
public string RoleId { get; set; } = string.Empty;
|
||||
|
||||
@@ -20,7 +18,6 @@ public class PveRole
|
||||
/// Comma-separated list of privilege strings assigned to this role
|
||||
/// (e.g., "VM.Allocate,VM.Config.Disk,Datastore.AllocateSpace").
|
||||
/// </summary>
|
||||
[JsonPropertyName("privs")]
|
||||
[JsonProperty("privs")]
|
||||
public string? Privileges { get; set; }
|
||||
|
||||
@@ -28,7 +25,6 @@ public class PveRole
|
||||
/// Indicates whether this is a built-in / special role (1) that cannot be deleted,
|
||||
/// or a custom role (0).
|
||||
/// </summary>
|
||||
[JsonPropertyName("special")]
|
||||
[JsonProperty("special")]
|
||||
public int? Special { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user