Skip to content

Commit 3c178ea

Browse files
author
github-actions[bot]
committed
feat: Updated OpenAPI spec
1 parent 59dea90 commit 3c178ea

12 files changed

+638
-463
lines changed

src/libs/GitHub/Generated/GitHub..JsonSerializerContext.g.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5751,6 +5751,8 @@ namespace GitHub
57515751
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsSortNullableJsonConverter),
57525752
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsOrderJsonConverter),
57535753
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsOrderNullableJsonConverter),
5754+
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsSearchTypeJsonConverter),
5755+
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsSearchTypeNullableJsonConverter),
57545756
typeof(global::GitHub.JsonConverters.SearchLabelsSortJsonConverter),
57555757
typeof(global::GitHub.JsonConverters.SearchLabelsSortNullableJsonConverter),
57565758
typeof(global::GitHub.JsonConverters.SearchLabelsOrderJsonConverter),

src/libs/GitHub/Generated/GitHub.IOrgsClient.OrgsCreateOrUpdateCustomPropertiesValuesForRepos.g.cs renamed to src/libs/GitHub/Generated/GitHub.IOrgsClient.OrgsCustomPropertiesForReposCreateOrUpdateOrganizationValues.g.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public partial interface IOrgsClient
1818
/// <param name="request"></param>
1919
/// <param name="cancellationToken">The token to cancel the operation with</param>
2020
/// <exception cref="global::GitHub.ApiException"></exception>
21-
global::System.Threading.Tasks.Task OrgsCreateOrUpdateCustomPropertiesValuesForReposAsync(
21+
global::System.Threading.Tasks.Task OrgsCustomPropertiesForReposCreateOrUpdateOrganizationValuesAsync(
2222
string org,
23-
global::GitHub.OrgsCreateOrUpdateCustomPropertiesValuesForReposRequest request,
23+
global::GitHub.OrgsCustomPropertiesForReposCreateOrUpdateOrganizationValuesRequest request,
2424
global::System.Threading.CancellationToken cancellationToken = default);
2525

2626
/// <summary>
@@ -42,7 +42,7 @@ public partial interface IOrgsClient
4242
/// </param>
4343
/// <param name="cancellationToken">The token to cancel the operation with</param>
4444
/// <exception cref="global::System.InvalidOperationException"></exception>
45-
global::System.Threading.Tasks.Task OrgsCreateOrUpdateCustomPropertiesValuesForReposAsync(
45+
global::System.Threading.Tasks.Task OrgsCustomPropertiesForReposCreateOrUpdateOrganizationValuesAsync(
4646
string org,
4747
global::System.Collections.Generic.IList<string> repositoryNames,
4848
global::System.Collections.Generic.IList<global::GitHub.CustomPropertyValue> properties,

src/libs/GitHub/Generated/GitHub.IOrgsClient.OrgsListCustomPropertiesValuesForRepos.g.cs renamed to src/libs/GitHub/Generated/GitHub.IOrgsClient.OrgsCustomPropertiesForReposGetOrganizationValues.g.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public partial interface IOrgsClient
1919
/// <param name="repositoryQuery"></param>
2020
/// <param name="cancellationToken">The token to cancel the operation with</param>
2121
/// <exception cref="global::GitHub.ApiException"></exception>
22-
global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::GitHub.OrgRepoCustomPropertyValues>> OrgsListCustomPropertiesValuesForReposAsync(
22+
global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::GitHub.OrgRepoCustomPropertyValues>> OrgsCustomPropertiesForReposGetOrganizationValuesAsync(
2323
string org,
2424
int? perPage = default,
2525
int? page = default,
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#nullable enable
2+
3+
namespace GitHub.JsonConverters
4+
{
5+
/// <inheritdoc />
6+
public sealed class SearchIssuesAndPullRequestsSearchTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::GitHub.SearchIssuesAndPullRequestsSearchType>
7+
{
8+
/// <inheritdoc />
9+
public override global::GitHub.SearchIssuesAndPullRequestsSearchType Read(
10+
ref global::System.Text.Json.Utf8JsonReader reader,
11+
global::System.Type typeToConvert,
12+
global::System.Text.Json.JsonSerializerOptions options)
13+
{
14+
switch (reader.TokenType)
15+
{
16+
case global::System.Text.Json.JsonTokenType.String:
17+
{
18+
var stringValue = reader.GetString();
19+
if (stringValue != null)
20+
{
21+
return global::GitHub.SearchIssuesAndPullRequestsSearchTypeExtensions.ToEnum(stringValue) ?? default;
22+
}
23+
24+
break;
25+
}
26+
case global::System.Text.Json.JsonTokenType.Number:
27+
{
28+
var numValue = reader.GetInt32();
29+
return (global::GitHub.SearchIssuesAndPullRequestsSearchType)numValue;
30+
}
31+
case global::System.Text.Json.JsonTokenType.Null:
32+
{
33+
return default(global::GitHub.SearchIssuesAndPullRequestsSearchType);
34+
}
35+
default:
36+
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
37+
}
38+
39+
return default;
40+
}
41+
42+
/// <inheritdoc />
43+
public override void Write(
44+
global::System.Text.Json.Utf8JsonWriter writer,
45+
global::GitHub.SearchIssuesAndPullRequestsSearchType value,
46+
global::System.Text.Json.JsonSerializerOptions options)
47+
{
48+
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
49+
50+
writer.WriteStringValue(global::GitHub.SearchIssuesAndPullRequestsSearchTypeExtensions.ToValueString(value));
51+
}
52+
}
53+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#nullable enable
2+
3+
namespace GitHub.JsonConverters
4+
{
5+
/// <inheritdoc />
6+
public sealed class SearchIssuesAndPullRequestsSearchTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::GitHub.SearchIssuesAndPullRequestsSearchType?>
7+
{
8+
/// <inheritdoc />
9+
public override global::GitHub.SearchIssuesAndPullRequestsSearchType? Read(
10+
ref global::System.Text.Json.Utf8JsonReader reader,
11+
global::System.Type typeToConvert,
12+
global::System.Text.Json.JsonSerializerOptions options)
13+
{
14+
switch (reader.TokenType)
15+
{
16+
case global::System.Text.Json.JsonTokenType.String:
17+
{
18+
var stringValue = reader.GetString();
19+
if (stringValue != null)
20+
{
21+
return global::GitHub.SearchIssuesAndPullRequestsSearchTypeExtensions.ToEnum(stringValue);
22+
}
23+
24+
break;
25+
}
26+
case global::System.Text.Json.JsonTokenType.Number:
27+
{
28+
var numValue = reader.GetInt32();
29+
return (global::GitHub.SearchIssuesAndPullRequestsSearchType)numValue;
30+
}
31+
case global::System.Text.Json.JsonTokenType.Null:
32+
{
33+
return default(global::GitHub.SearchIssuesAndPullRequestsSearchType?);
34+
}
35+
default:
36+
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
37+
}
38+
39+
return default;
40+
}
41+
42+
/// <inheritdoc />
43+
public override void Write(
44+
global::System.Text.Json.Utf8JsonWriter writer,
45+
global::GitHub.SearchIssuesAndPullRequestsSearchType? value,
46+
global::System.Text.Json.JsonSerializerOptions options)
47+
{
48+
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
49+
50+
if (value == null)
51+
{
52+
writer.WriteNullValue();
53+
}
54+
else
55+
{
56+
writer.WriteStringValue(global::GitHub.SearchIssuesAndPullRequestsSearchTypeExtensions.ToValueString(value.Value));
57+
}
58+
}
59+
}
60+
}

0 commit comments

Comments
 (0)