Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in generated code #30

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/GitHub.Octokit.GHEC.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.1.0" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.1.2" />
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.13.0" />
<PackageReference Include="Microsoft.Kiota.Bundle" Version="1.13.0" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.13.0" />
Expand Down
4 changes: 0 additions & 4 deletions src/GitHub/Models/OrganizationFull.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ public partial class OrganizationFull : IAdditionalDataHolder, IParsable
#else
public string Blog { get; set; }
#endif
/// <summary>The collaborators property</summary>
public int? Collaborators { get; set; }
/// <summary>The company property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -312,7 +310,6 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{ "avatar_url", n => { AvatarUrl = n.GetStringValue(); } },
{ "billing_email", n => { BillingEmail = n.GetStringValue(); } },
{ "blog", n => { Blog = n.GetStringValue(); } },
{ "collaborators", n => { Collaborators = n.GetIntValue(); } },
{ "company", n => { Company = n.GetStringValue(); } },
{ "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } },
{ "default_repository_permission", n => { DefaultRepositoryPermission = n.GetStringValue(); } },
Expand Down Expand Up @@ -379,7 +376,6 @@ public virtual void Serialize(ISerializationWriter writer)
writer.WriteStringValue("avatar_url", AvatarUrl);
writer.WriteStringValue("billing_email", BillingEmail);
writer.WriteStringValue("blog", Blog);
writer.WriteIntValue("collaborators", Collaborators);
writer.WriteStringValue("company", Company);
writer.WriteDateTimeOffsetValue("created_at", CreatedAt);
writer.WriteStringValue("default_repository_permission", DefaultRepositoryPermission);
Expand Down
54 changes: 14 additions & 40 deletions src/GitHub/Models/Users.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,23 @@ public partial class Users : IAdditionalDataHolder, IParsable
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
/// <summary>The fragment property</summary>
/// <summary>Whether this email address is the primary address.</summary>
public bool? Primary { get; set; }
/// <summary>The type of email address.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Fragment { get; set; }
public string? Type { get; set; }
#nullable restore
#else
public string Fragment { get; set; }
public string Type { get; set; }
#endif
/// <summary>The matches property</summary>
/// <summary>The email address.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<global::GitHub.Models.Users_matches>? Matches { get; set; }
public string? Value { get; set; }
#nullable restore
#else
public List<global::GitHub.Models.Users_matches> Matches { get; set; }
#endif
/// <summary>The object_type property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? ObjectType { get; set; }
#nullable restore
#else
public string ObjectType { get; set; }
#endif
/// <summary>The object_url property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? ObjectUrl { get; set; }
#nullable restore
#else
public string ObjectUrl { get; set; }
#endif
/// <summary>The property property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Property { get; set; }
#nullable restore
#else
public string Property { get; set; }
public string Value { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.Users"/> and sets the default values.
Expand All @@ -79,11 +57,9 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "fragment", n => { Fragment = n.GetStringValue(); } },
{ "matches", n => { Matches = n.GetCollectionOfObjectValues<global::GitHub.Models.Users_matches>(global::GitHub.Models.Users_matches.CreateFromDiscriminatorValue)?.AsList(); } },
{ "object_type", n => { ObjectType = n.GetStringValue(); } },
{ "object_url", n => { ObjectUrl = n.GetStringValue(); } },
{ "property", n => { Property = n.GetStringValue(); } },
{ "primary", n => { Primary = n.GetBoolValue(); } },
{ "type", n => { Type = n.GetStringValue(); } },
{ "value", n => { Value = n.GetStringValue(); } },
};
}
/// <summary>
Expand All @@ -93,11 +69,9 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("fragment", Fragment);
writer.WriteCollectionOfObjectValues<global::GitHub.Models.Users_matches>("matches", Matches);
writer.WriteStringValue("object_type", ObjectType);
writer.WriteStringValue("object_url", ObjectUrl);
writer.WriteStringValue("property", Property);
writer.WriteBoolValue("primary", Primary);
writer.WriteStringValue("type", Type);
writer.WriteStringValue("value", Value);
writer.WriteAdditionalData(AdditionalData);
}
}
Expand Down
75 changes: 0 additions & 75 deletions src/GitHub/Models/Users_matches.cs

This file was deleted.

14 changes: 12 additions & 2 deletions src/GitHub/Orgs/Item/Rulesets/RulesetsRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ public partial class RulesetsRequestBuilder : BaseRequestBuilder
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public RulesetsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*}", pathParameters)
public RulesetsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*,targets*}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Orgs.Item.Rulesets.RulesetsRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*}", rawUrl)
public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*,targets*}", rawUrl)
{
}
/// <summary>
Expand Down Expand Up @@ -169,6 +169,16 @@ public partial class RulesetsRequestBuilderGetQueryParameters
/// <summary>The number of results per page (max 100). For more information, see &quot;[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api).&quot;</summary>
[QueryParameter("per_page")]
public int? PerPage { get; set; }
/// <summary>A comma-separated list of rule targets to filter by.If provided, only rulesets that apply to the specified targets will be returned.For example, `branch,tag,push`.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("targets")]
public string? Targets { get; set; }
#nullable restore
#else
[QueryParameter("targets")]
public string Targets { get; set; }
#endif
}
}
}
Expand Down
14 changes: 12 additions & 2 deletions src/GitHub/Repos/Item/Item/Rulesets/RulesetsRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ public partial class RulesetsRequestBuilder : BaseRequestBuilder
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public RulesetsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*}", pathParameters)
public RulesetsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*,targets*}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Repos.Item.Item.Rulesets.RulesetsRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*}", rawUrl)
public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*,targets*}", rawUrl)
{
}
/// <summary>
Expand Down Expand Up @@ -172,6 +172,16 @@ public partial class RulesetsRequestBuilderGetQueryParameters
/// <summary>The number of results per page (max 100). For more information, see &quot;[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api).&quot;</summary>
[QueryParameter("per_page")]
public int? PerPage { get; set; }
/// <summary>A comma-separated list of rule targets to filter by.If provided, only rulesets that apply to the specified targets will be returned.For example, `branch,tag,push`.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("targets")]
public string? Targets { get; set; }
#nullable restore
#else
[QueryParameter("targets")]
public string Targets { get; set; }
#endif
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "78E960D62E4977D7C0590CFB9F19215F0D810ACA39F64862C52E2D17758BE492D45635B01CC02DDA49AB89ABB9688B3996719F5A57DEF299897C71D6436F4F66",
"descriptionHash": "567AA037AA6B2D60BC67F7C46971EE22943D5837F6871E22096D9537BD31048C7703006F6D979F2827CB5241DAD76AC628E34B8FB65D4C3E70CFD12013A0E2DE",
"descriptionLocation": "../../../../../schemas/ghec.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.19.0",
Expand Down
Loading