diff --git a/NGitLab/Models/ApprovalRuleCreate.cs b/NGitLab/Models/ApprovalRuleCreate.cs index 61e7ca7f..da1b460f 100644 --- a/NGitLab/Models/ApprovalRuleCreate.cs +++ b/NGitLab/Models/ApprovalRuleCreate.cs @@ -1,16 +1,10 @@ -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace NGitLab.Models; public class ApprovalRuleCreate { - // Unnecessary in the POSTed JSON; the 'Project Id' is actually specified through the endpoint URL. - [EditorBrowsable(EditorBrowsableState.Never)] - [JsonIgnore] - public long Id { get; set; } - /// /// Type of the rule. /// diff --git a/NGitLab/Models/ApprovalRuleUpdate.cs b/NGitLab/Models/ApprovalRuleUpdate.cs index 7f4b3a18..0434d777 100644 --- a/NGitLab/Models/ApprovalRuleUpdate.cs +++ b/NGitLab/Models/ApprovalRuleUpdate.cs @@ -1,16 +1,10 @@ -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace NGitLab.Models; public sealed class ApprovalRuleUpdate { - // Unnecessary in the PUT JSON; the 'Project Id' is actually specified through the endpoint URL. - [EditorBrowsable(EditorBrowsableState.Never)] - [JsonIgnore] - public long Id { get; set; } - /// /// The name of the approval rule. /// diff --git a/NGitLab/Models/CommitCreate.cs b/NGitLab/Models/CommitCreate.cs index 549bc9d7..30c963ec 100644 --- a/NGitLab/Models/CommitCreate.cs +++ b/NGitLab/Models/CommitCreate.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; @@ -7,11 +6,6 @@ namespace NGitLab.Models; public class CommitCreate { - // Unnecessary in the POSTed JSON; the 'Project Id' is actually specified through the endpoint URL. - [EditorBrowsable(EditorBrowsableState.Never)] - [JsonIgnore] - public long ProjectId; - [Required] [JsonPropertyName("branch")] public string Branch; diff --git a/NGitLab/Models/CommitStatus.cs b/NGitLab/Models/CommitStatus.cs index b0d5337a..cf2688a8 100644 --- a/NGitLab/Models/CommitStatus.cs +++ b/NGitLab/Models/CommitStatus.cs @@ -1,17 +1,11 @@ -using System.ComponentModel; -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace NGitLab.Models; public class CommitStatus { - // This is NOT the 'Project Id', but some kind of (undocumented) 'Commit Status Id' - [EditorBrowsable(EditorBrowsableState.Never)] - [JsonIgnore] - public long ProjectId; - [JsonPropertyName("id")] - public long Id { get => ProjectId; set => ProjectId = value; } + public long Id { get; set; } [JsonPropertyName("sha")] public string CommitSha; diff --git a/NGitLab/Models/CommitStatusCreate.cs b/NGitLab/Models/CommitStatusCreate.cs index 00c3461d..0545b436 100644 --- a/NGitLab/Models/CommitStatusCreate.cs +++ b/NGitLab/Models/CommitStatusCreate.cs @@ -1,15 +1,9 @@ -using System.ComponentModel; -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace NGitLab.Models; public class CommitStatusCreate { - // Unnecessary in the POSTed JSON; the 'Project Id' is actually specified through the endpoint URL. - [EditorBrowsable(EditorBrowsableState.Never)] - [JsonIgnore] - public long ProjectId; - [JsonPropertyName("sha")] public string CommitSha; diff --git a/NGitLab/Models/Deployment.cs b/NGitLab/Models/Deployment.cs index c8adebac..bc22fd84 100644 --- a/NGitLab/Models/Deployment.cs +++ b/NGitLab/Models/Deployment.cs @@ -3,9 +3,7 @@ namespace NGitLab.Models; -#pragma warning disable CA1724 // Type names should not match .NET Framework class library namespaces public class Deployment -#pragma warning restore CA1724 // Type names should not match .NET Framework class library namespaces { [JsonPropertyName("id")] public long Id { get; set; } diff --git a/NGitLab/Models/EpicEdit.cs b/NGitLab/Models/EpicEdit.cs index 4514cbdf..7426d397 100644 --- a/NGitLab/Models/EpicEdit.cs +++ b/NGitLab/Models/EpicEdit.cs @@ -1,16 +1,10 @@ -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace NGitLab.Models; public class EpicEdit { - // Unnecessary in the PUT JSON - [EditorBrowsable(EditorBrowsableState.Never)] - [JsonIgnore] - public long Id { get; set; } - [Required] [JsonPropertyName("epic_iid")] public long EpicId { get; set; } diff --git a/NGitLab/Models/IssueCreate.cs b/NGitLab/Models/IssueCreate.cs index 47aad28f..cdbe3cca 100644 --- a/NGitLab/Models/IssueCreate.cs +++ b/NGitLab/Models/IssueCreate.cs @@ -1,5 +1,4 @@ using System; -using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; using NGitLab.Impl.Json; @@ -9,11 +8,7 @@ namespace NGitLab.Models; public class IssueCreate { [JsonIgnore] - public long ProjectId { get => Id; set => Id = value; } - - [EditorBrowsable(EditorBrowsableState.Never)] - [JsonIgnore] - public long Id; + public long ProjectId { get; set; } [Required] [JsonPropertyName("title")] diff --git a/NGitLab/Models/IssueEdit.cs b/NGitLab/Models/IssueEdit.cs index 369bc1d1..ac6a0601 100644 --- a/NGitLab/Models/IssueEdit.cs +++ b/NGitLab/Models/IssueEdit.cs @@ -1,5 +1,4 @@ using System; -using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; using NGitLab.Impl.Json; @@ -9,11 +8,7 @@ namespace NGitLab.Models; public class IssueEdit { [JsonIgnore] - public long ProjectId { get => Id; set => Id = value; } - - [EditorBrowsable(EditorBrowsableState.Never)] - [JsonIgnore] - public long Id; + public long ProjectId { get; set; } [Required] [JsonPropertyName("issue_id")] diff --git a/NGitLab/Models/LabelEdit.cs b/NGitLab/Models/LabelEdit.cs index 54c67ef8..57137130 100644 --- a/NGitLab/Models/LabelEdit.cs +++ b/NGitLab/Models/LabelEdit.cs @@ -7,16 +7,6 @@ namespace NGitLab.Models; [EditorBrowsable(EditorBrowsableState.Never)] public class LabelEdit { - public LabelEdit() - { - } - - public LabelEdit(long projectId, Label label) - { - Id = projectId; - Name = label.Name; - } - [JsonIgnore] public long Id; diff --git a/NGitLab/PublicAPI.Unshipped.txt b/NGitLab/PublicAPI.Unshipped.txt index 46d8ce5f..11c5cff8 100644 --- a/NGitLab/PublicAPI.Unshipped.txt +++ b/NGitLab/PublicAPI.Unshipped.txt @@ -1242,8 +1242,6 @@ NGitLab.Models.ApprovalRuleCreate.ApprovalsRequired.get -> int NGitLab.Models.ApprovalRuleCreate.ApprovalsRequired.set -> void NGitLab.Models.ApprovalRuleCreate.GroupIds.get -> long[] NGitLab.Models.ApprovalRuleCreate.GroupIds.set -> void -NGitLab.Models.ApprovalRuleCreate.Id.get -> long -NGitLab.Models.ApprovalRuleCreate.Id.set -> void NGitLab.Models.ApprovalRuleCreate.Name.get -> string NGitLab.Models.ApprovalRuleCreate.Name.set -> void NGitLab.Models.ApprovalRuleCreate.ProtectedBranchIds.get -> long[] @@ -1260,8 +1258,6 @@ NGitLab.Models.ApprovalRuleUpdate.ApprovalsRequired.get -> int NGitLab.Models.ApprovalRuleUpdate.ApprovalsRequired.set -> void NGitLab.Models.ApprovalRuleUpdate.GroupIds.get -> long[] NGitLab.Models.ApprovalRuleUpdate.GroupIds.set -> void -NGitLab.Models.ApprovalRuleUpdate.Id.get -> long -NGitLab.Models.ApprovalRuleUpdate.Id.set -> void NGitLab.Models.ApprovalRuleUpdate.Name.get -> string NGitLab.Models.ApprovalRuleUpdate.Name.set -> void NGitLab.Models.ApprovalRuleUpdate.ProtectedBranchIds.get -> long[] @@ -1436,7 +1432,6 @@ NGitLab.Models.CommitCreate.Branch -> string NGitLab.Models.CommitCreate.CommitCreate() -> void NGitLab.Models.CommitCreate.CommitMessage -> string NGitLab.Models.CommitCreate.Force -> bool? -NGitLab.Models.CommitCreate.ProjectId -> long NGitLab.Models.CommitCreate.StartBranch -> string NGitLab.Models.CommitCreate.StartSha -> string NGitLab.Models.CommitInfo @@ -1472,7 +1467,6 @@ NGitLab.Models.CommitStatus.Description -> string NGitLab.Models.CommitStatus.Id.get -> long NGitLab.Models.CommitStatus.Id.set -> void NGitLab.Models.CommitStatus.Name -> string -NGitLab.Models.CommitStatus.ProjectId -> long NGitLab.Models.CommitStatus.Ref -> string NGitLab.Models.CommitStatus.Status -> string NGitLab.Models.CommitStatus.TargetUrl -> string @@ -1483,7 +1477,6 @@ NGitLab.Models.CommitStatusCreate.Coverage -> int? NGitLab.Models.CommitStatusCreate.Description -> string NGitLab.Models.CommitStatusCreate.Name -> string NGitLab.Models.CommitStatusCreate.PipelineId -> long? -NGitLab.Models.CommitStatusCreate.ProjectId -> long NGitLab.Models.CommitStatusCreate.Ref -> string NGitLab.Models.CommitStatusCreate.State -> string NGitLab.Models.CommitStatusCreate.Status -> string @@ -1668,8 +1661,6 @@ NGitLab.Models.EpicEdit.Description.set -> void NGitLab.Models.EpicEdit.EpicEdit() -> void NGitLab.Models.EpicEdit.EpicId.get -> long NGitLab.Models.EpicEdit.EpicId.set -> void -NGitLab.Models.EpicEdit.Id.get -> long -NGitLab.Models.EpicEdit.Id.set -> void NGitLab.Models.EpicEdit.Labels.get -> string NGitLab.Models.EpicEdit.Labels.set -> void NGitLab.Models.EpicEdit.State.get -> string @@ -2080,7 +2071,6 @@ NGitLab.Models.IssueCreate.Confidential -> bool NGitLab.Models.IssueCreate.Description -> string NGitLab.Models.IssueCreate.DueDate -> System.DateTime? NGitLab.Models.IssueCreate.EpicId -> long? -NGitLab.Models.IssueCreate.Id -> long NGitLab.Models.IssueCreate.IssueCreate() -> void NGitLab.Models.IssueCreate.Labels -> string NGitLab.Models.IssueCreate.MileStoneId -> long? @@ -2093,7 +2083,6 @@ NGitLab.Models.IssueEdit.AssigneeIds -> long[] NGitLab.Models.IssueEdit.Description -> string NGitLab.Models.IssueEdit.DueDate -> System.DateTime? NGitLab.Models.IssueEdit.EpicId -> long? -NGitLab.Models.IssueEdit.Id -> long NGitLab.Models.IssueEdit.IssueEdit() -> void NGitLab.Models.IssueEdit.IssueId -> long NGitLab.Models.IssueEdit.Labels -> string @@ -2300,7 +2289,6 @@ NGitLab.Models.LabelEdit.Color -> string NGitLab.Models.LabelEdit.Description -> string NGitLab.Models.LabelEdit.Id -> long NGitLab.Models.LabelEdit.LabelEdit() -> void -NGitLab.Models.LabelEdit.LabelEdit(long projectId, NGitLab.Models.Label label) -> void NGitLab.Models.LabelEdit.Name -> string NGitLab.Models.LabelEdit.NewName -> string NGitLab.Models.LastActivityDate @@ -4177,4 +4165,4 @@ virtual NGitLab.Impl.HttpRequestor.To(string tailAPIUrl) -> T virtual NGitLab.Impl.HttpRequestor.ToAsync(string tailAPIUrl, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task virtual NGitLab.RequestOptions.GetResponse(System.Net.HttpWebRequest request) -> System.Net.WebResponse virtual NGitLab.RequestOptions.GetResponseAsync(System.Net.HttpWebRequest request, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task -virtual NGitLab.RequestOptions.ShouldRetry(System.Exception ex, int retryNumber) -> bool \ No newline at end of file +virtual NGitLab.RequestOptions.ShouldRetry(System.Exception ex, int retryNumber) -> bool