-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fixed missing models when use IncludeTags.
- Loading branch information
Showing
469 changed files
with
94,198 additions
and
52,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...SnapshotTests/Snapshots/Filtering/NewtonsoftJson/Tests.Filtering_Diagnostics.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
38 changes: 38 additions & 0 deletions
38
...s/OpenApiGenerator.SnapshotTests/Snapshots/Filtering/NewtonsoftJson/_#G.Api.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//HintName: G.Api.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
/// <summary> | ||
/// If no httpClient is provided, a new one will be created. | ||
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. | ||
/// </summary> | ||
public sealed partial class Api : global::System.IDisposable | ||
{ | ||
private readonly global::System.Net.Http.HttpClient _httpClient; | ||
|
||
public MigrationsClient Migrations => new MigrationsClient(_httpClient); | ||
|
||
/// <summary> | ||
/// Creates a new instance of the Api. | ||
/// If no httpClient is provided, a new one will be created. | ||
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. | ||
/// </summary> | ||
/// <param name="httpClient"></param> | ||
/// <param name="baseUri"></param> | ||
public Api( | ||
global::System.Net.Http.HttpClient? httpClient = null, | ||
global::System.Uri? baseUri = null) | ||
{ | ||
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); | ||
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri("https://api.github.com"); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public void Dispose() | ||
{ | ||
_httpClient.Dispose(); | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...pshots/Filtering/NewtonsoftJson/_#G.MigrationsClient.MigrationsCancelImport.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//HintName: G.MigrationsClient.MigrationsCancelImport.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class MigrationsClient | ||
{ | ||
/// <summary> | ||
/// Cancel an import | ||
/// </summary> | ||
/// <param name="owner"></param> | ||
/// <param name="repo"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task MigrationsCancelImportAsync( | ||
string owner, | ||
string repo, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Delete, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/repos/{owner}/{repo}/import", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...onsoftJson/_#G.MigrationsClient.MigrationsDeleteArchiveForAuthenticatedUser.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//HintName: G.MigrationsClient.MigrationsDeleteArchiveForAuthenticatedUser.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class MigrationsClient | ||
{ | ||
/// <summary> | ||
/// Delete a user migration archive | ||
/// </summary> | ||
/// <param name="migrationId"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task MigrationsDeleteArchiveForAuthenticatedUserAsync( | ||
int migrationId, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Delete, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/user/migrations/{migrationId}/archive", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...Filtering/NewtonsoftJson/_#G.MigrationsClient.MigrationsDeleteArchiveForOrg.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//HintName: G.MigrationsClient.MigrationsDeleteArchiveForOrg.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class MigrationsClient | ||
{ | ||
/// <summary> | ||
/// Delete an organization migration archive | ||
/// </summary> | ||
/// <param name="org"></param> | ||
/// <param name="migrationId"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task MigrationsDeleteArchiveForOrgAsync( | ||
string org, | ||
int migrationId, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Delete, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/orgs/{org}/migrations/{migrationId}/archive", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...ltering/NewtonsoftJson/_#G.MigrationsClient.MigrationsDownloadArchiveForOrg.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//HintName: G.MigrationsClient.MigrationsDownloadArchiveForOrg.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class MigrationsClient | ||
{ | ||
/// <summary> | ||
/// Download an organization migration archive | ||
/// </summary> | ||
/// <param name="org"></param> | ||
/// <param name="migrationId"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task MigrationsDownloadArchiveForOrgAsync( | ||
string org, | ||
int migrationId, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Get, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/orgs/{org}/migrations/{migrationId}/archive", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...ewtonsoftJson/_#G.MigrationsClient.MigrationsGetArchiveForAuthenticatedUser.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//HintName: G.MigrationsClient.MigrationsGetArchiveForAuthenticatedUser.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class MigrationsClient | ||
{ | ||
/// <summary> | ||
/// Download a user migration archive | ||
/// </summary> | ||
/// <param name="migrationId"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task MigrationsGetArchiveForAuthenticatedUserAsync( | ||
int migrationId, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Get, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/user/migrations/{migrationId}/archive", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...ts/Filtering/NewtonsoftJson/_#G.MigrationsClient.MigrationsGetCommitAuthors.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//HintName: G.MigrationsClient.MigrationsGetCommitAuthors.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class MigrationsClient | ||
{ | ||
/// <summary> | ||
/// Get commit authors | ||
/// </summary> | ||
/// <param name="owner"></param> | ||
/// <param name="repo"></param> | ||
/// <param name="since"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task MigrationsGetCommitAuthorsAsync( | ||
string owner, | ||
string repo, | ||
int since, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Get, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/repos/{owner}/{repo}/import/authors?since={since}", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...ots/Filtering/NewtonsoftJson/_#G.MigrationsClient.MigrationsGetImportStatus.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//HintName: G.MigrationsClient.MigrationsGetImportStatus.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class MigrationsClient | ||
{ | ||
/// <summary> | ||
/// Get an import status | ||
/// </summary> | ||
/// <param name="owner"></param> | ||
/// <param name="repo"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task<Import> MigrationsGetImportStatusAsync( | ||
string owner, | ||
string repo, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Get, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/repos/{owner}/{repo}/import", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
|
||
var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); | ||
|
||
return | ||
global::Newtonsoft.Json.JsonConvert.DeserializeObject<Import>(content) ?? | ||
throw new global::System.InvalidOperationException("Response deserialization failed for \"{content}\" "); | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...shots/Filtering/NewtonsoftJson/_#G.MigrationsClient.MigrationsGetLargeFiles.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//HintName: G.MigrationsClient.MigrationsGetLargeFiles.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class MigrationsClient | ||
{ | ||
/// <summary> | ||
/// Get large files | ||
/// </summary> | ||
/// <param name="owner"></param> | ||
/// <param name="repo"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task MigrationsGetLargeFilesAsync( | ||
string owner, | ||
string repo, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Get, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/repos/{owner}/{repo}/import/large_files", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...NewtonsoftJson/_#G.MigrationsClient.MigrationsGetStatusForAuthenticatedUser.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//HintName: G.MigrationsClient.MigrationsGetStatusForAuthenticatedUser.g.cs | ||
using System.Linq; | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class MigrationsClient | ||
{ | ||
/// <summary> | ||
/// Get a user migration status | ||
/// </summary> | ||
/// <param name="migrationId"></param> | ||
/// <param name="exclude"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task<Migration> MigrationsGetStatusForAuthenticatedUserAsync( | ||
int migrationId, | ||
global::System.Collections.Generic.IList<string> exclude, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Get, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/user/migrations/{migrationId}?{string.Join("&", exclude.Select(static x => $"exclude={x}"))}", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
|
||
var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); | ||
|
||
return | ||
global::Newtonsoft.Json.JsonConvert.DeserializeObject<Migration>(content) ?? | ||
throw new global::System.InvalidOperationException("Response deserialization failed for \"{content}\" "); | ||
} | ||
} | ||
} |
Oops, something went wrong.