removed IApi namespace (#16058)

This commit is contained in:
devhl-labs 2023-07-11 02:01:45 -04:00 committed by GitHub
parent 9362b49173
commit ceb48d3af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 260 additions and 342 deletions

View File

@ -1,6 +1,6 @@
using System; using System;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using {{packageName}}.{{apiPackage}};
namespace {{packageName}}.{{clientPackage}} namespace {{packageName}}.{{clientPackage}}
{ {
@ -14,7 +14,7 @@ namespace {{packageName}}.{{clientPackage}}
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
IResult Create<IResult>() where IResult : {{interfacePrefix}}{{apiPackage}}.IApi; IResult Create<IResult>() where IResult : IApi;
} }
/// <summary> /// <summary>
@ -41,7 +41,7 @@ namespace {{packageName}}.{{clientPackage}}
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
public IResult Create<IResult>() where IResult : {{interfacePrefix}}{{apiPackage}}.IApi public IResult Create<IResult>() where IResult : IApi
{ {
return Services.GetRequiredService<IResult>(); return Services.GetRequiredService<IResult>();
} }

View File

@ -5,7 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Cryptography; using System.Security.Cryptography;
using {{packageName}}.{{clientPackage}}; using {{packageName}}.{{clientPackage}};
using {{packageName}}.{{interfacePrefix}}{{apiPackage}}; using {{packageName}}.{{apiPackage}};
using {{packageName}}.Extensions; using {{packageName}}.Extensions;
using Xunit; using Xunit;
@ -114,7 +114,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
[Fact] [Fact]
public void ConfigureApiWithAClientTest() public void ConfigureApiWithAClientTest()
{ {
{{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}}
{{/-last}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}
@ -126,7 +126,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
[Fact] [Fact]
public void ConfigureApiWithoutAClientTest() public void ConfigureApiWithoutAClientTest()
{ {
{{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}}
{{/-last}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}
@ -138,7 +138,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
[Fact] [Fact]
public void AddApiWithAClientTest() public void AddApiWithAClientTest()
{ {
{{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}}
{{/-last}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}
@ -150,7 +150,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
[Fact] [Fact]
public void AddApiWithoutAClientTest() public void AddApiWithoutAClientTest()
{ {
{{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}}
{{/-last}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -11,7 +11,6 @@ using System.Text.Json.Serialization;
using System.Net.Http; using System.Net.Http;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using {{packageName}}.{{apiPackage}}; using {{packageName}}.{{apiPackage}};
using {{packageName}}.{{interfacePrefix}}{{apiPackage}};
using {{packageName}}.{{modelPackage}}; using {{packageName}}.{{modelPackage}};
namespace {{packageName}}.{{clientPackage}} namespace {{packageName}}.{{clientPackage}}

View File

@ -1,6 +1,6 @@
using System.Net.Http; using System.Net.Http;
namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}} namespace {{packageName}}.{{apiPackage}}
{ {
/// <summary> /// <summary>
/// Any Api client /// Any Api client

View File

@ -18,7 +18,7 @@ using {{packageName}}.{{apiPackage}};
using {{packageName}}.{{modelPackage}}; using {{packageName}}.{{modelPackage}};
{{/hasImport}} {{/hasImport}}
namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}} namespace {{packageName}}.{{apiPackage}}
{ {
{{#operations}} {{#operations}}
/// <summary> /// <summary>
@ -64,10 +64,7 @@ namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}}
{{/-last}} {{/-last}}
{{/operation}} {{/operation}}
} }
}
namespace {{packageName}}.{{apiPackage}}
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -103,7 +100,7 @@ namespace {{packageName}}.{{apiPackage}}
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
{{>visibility}} sealed partial class {{classname}} : {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} {{>visibility}} sealed partial class {{classname}} : {{interfacePrefix}}{{classname}}
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using {{packageName}}.{{interfacePrefix}}{{apiPackage}};{{#hasImport}} using {{packageName}}.{{apiPackage}};{{#hasImport}}
using {{packageName}}.{{modelPackage}};{{/hasImport}} using {{packageName}}.{{modelPackage}};{{/hasImport}}
@ -18,11 +18,11 @@ namespace {{packageName}}.Test.{{apiPackage}}
/// </summary> /// </summary>
public sealed class {{classname}}Tests : ApiTestsBase public sealed class {{classname}}Tests : ApiTestsBase
{ {
private readonly {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} _instance; private readonly {{interfacePrefix}}{{classname}} _instance;
public {{classname}}Tests(): base(Array.Empty<string>()) public {{classname}}Tests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); _instance = _host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
} }
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class AnotherFakeApiTests : ApiTestsBase public sealed class AnotherFakeApiTests : ApiTestsBase
{ {
private readonly IApi.IAnotherFakeApi _instance; private readonly IAnotherFakeApi _instance;
public AnotherFakeApiTests(): base(Array.Empty<string>()) public AnotherFakeApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IAnotherFakeApi>(); _instance = _host.Services.GetRequiredService<IAnotherFakeApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class DefaultApiTests : ApiTestsBase public sealed class DefaultApiTests : ApiTestsBase
{ {
private readonly IApi.IDefaultApi _instance; private readonly IDefaultApi _instance;
public DefaultApiTests(): base(Array.Empty<string>()) public DefaultApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>(); _instance = _host.Services.GetRequiredService<IDefaultApi>();
} }
/// <summary> /// <summary>

View File

@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Cryptography; using System.Security.Cryptography;
using Org.OpenAPITools.Client; using Org.OpenAPITools.Client;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Extensions; using Org.OpenAPITools.Extensions;
using Xunit; using Xunit;
@ -122,25 +122,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithAClientTest() public void ConfigureApiWithAClientTest()
{ {
var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
@ -150,25 +150,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithoutAClientTest() public void ConfigureApiWithoutAClientTest()
{ {
var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
@ -178,25 +178,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithAClientTest() public void AddApiWithAClientTest()
{ {
var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
@ -206,25 +206,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithoutAClientTest() public void AddApiWithoutAClientTest()
{ {
var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
} }

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class FakeApiTests : ApiTestsBase public sealed class FakeApiTests : ApiTestsBase
{ {
private readonly IApi.IFakeApi _instance; private readonly IFakeApi _instance;
public FakeApiTests(): base(Array.Empty<string>()) public FakeApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IFakeApi>(); _instance = _host.Services.GetRequiredService<IFakeApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class FakeClassnameTags123ApiTests : ApiTestsBase public sealed class FakeClassnameTags123ApiTests : ApiTestsBase
{ {
private readonly IApi.IFakeClassnameTags123Api _instance; private readonly IFakeClassnameTags123Api _instance;
public FakeClassnameTags123ApiTests(): base(Array.Empty<string>()) public FakeClassnameTags123ApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); _instance = _host.Services.GetRequiredService<IFakeClassnameTags123Api>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class PetApiTests : ApiTestsBase public sealed class PetApiTests : ApiTestsBase
{ {
private readonly IApi.IPetApi _instance; private readonly IPetApi _instance;
public PetApiTests(): base(Array.Empty<string>()) public PetApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IPetApi>(); _instance = _host.Services.GetRequiredService<IPetApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class StoreApiTests : ApiTestsBase public sealed class StoreApiTests : ApiTestsBase
{ {
private readonly IApi.IStoreApi _instance; private readonly IStoreApi _instance;
public StoreApiTests(): base(Array.Empty<string>()) public StoreApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IStoreApi>(); _instance = _host.Services.GetRequiredService<IStoreApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class UserApiTests : ApiTestsBase public sealed class UserApiTests : ApiTestsBase
{ {
private readonly IApi.IUserApi _instance; private readonly IUserApi _instance;
public UserApiTests(): base(Array.Empty<string>()) public UserApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IUserApi>(); _instance = _host.Services.GetRequiredService<IUserApi>();
} }
/// <summary> /// <summary>

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -58,10 +58,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;?&gt;</returns>
Task<ApiResponse<ModelClient>?> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<ModelClient>?> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -92,7 +89,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class AnotherFakeApi : IApi.IAnotherFakeApi public sealed partial class AnotherFakeApi : IAnotherFakeApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -100,10 +100,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;?&gt;</returns>
Task<ApiResponse<List<Guid>>?> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<List<Guid>>?> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -174,7 +171,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class DefaultApi : IApi.IDefaultApi public sealed partial class DefaultApi : IDefaultApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -448,10 +448,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;object&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;object&gt;?&gt;</returns>
Task<ApiResponse<object>?> TestQueryParameterCollectionFormatOrDefaultAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string? requiredNullable = default, Option<string> notRequiredNotNullable = default, Option<string?> notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<object>?> TestQueryParameterCollectionFormatOrDefaultAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string? requiredNullable = default, Option<string> notRequiredNotNullable = default, Option<string?> notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -762,7 +759,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class FakeApi : IApi.IFakeApi public sealed partial class FakeApi : IFakeApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -58,10 +58,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;?&gt;</returns>
Task<ApiResponse<ModelClient>?> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<ModelClient>?> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -92,7 +89,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class FakeClassnameTags123Api : IApi.IFakeClassnameTags123Api public sealed partial class FakeClassnameTags123Api : IFakeClassnameTags123Api
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -1,6 +1,6 @@
using System.Net.Http; using System.Net.Http;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Any Api client /// Any Api client

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -256,10 +256,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;ApiResponse&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;ApiResponse&gt;?&gt;</returns>
Task<ApiResponse<ApiResponse>?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata = default, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<ApiResponse>?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata = default, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -450,7 +447,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class PetApi : IApi.IPetApi public sealed partial class PetApi : IPetApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -125,10 +125,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;Order&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;Order&gt;?&gt;</returns>
Task<ApiResponse<Order>?> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<Order>?> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -219,7 +216,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class StoreApi : IApi.IStoreApi public sealed partial class StoreApi : IStoreApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -221,10 +221,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;object&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;object&gt;?&gt;</returns>
Task<ApiResponse<object>?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<object>?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -395,7 +392,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class UserApi : IApi.IUserApi public sealed partial class UserApi : IUserApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -1,6 +1,6 @@
using System; using System;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client
{ {
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
IResult Create<IResult>() where IResult : IApi.IApi; IResult Create<IResult>() where IResult : IApi;
} }
/// <summary> /// <summary>
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
public IResult Create<IResult>() where IResult : IApi.IApi public IResult Create<IResult>() where IResult : IApi
{ {
return Services.GetRequiredService<IResult>(); return Services.GetRequiredService<IResult>();
} }

View File

@ -17,7 +17,6 @@ using System.Text.Json.Serialization;
using System.Net.Http; using System.Net.Http;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.IApi;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class AnotherFakeApiTests : ApiTestsBase public sealed class AnotherFakeApiTests : ApiTestsBase
{ {
private readonly IApi.IAnotherFakeApi _instance; private readonly IAnotherFakeApi _instance;
public AnotherFakeApiTests(): base(Array.Empty<string>()) public AnotherFakeApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IAnotherFakeApi>(); _instance = _host.Services.GetRequiredService<IAnotherFakeApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class DefaultApiTests : ApiTestsBase public sealed class DefaultApiTests : ApiTestsBase
{ {
private readonly IApi.IDefaultApi _instance; private readonly IDefaultApi _instance;
public DefaultApiTests(): base(Array.Empty<string>()) public DefaultApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>(); _instance = _host.Services.GetRequiredService<IDefaultApi>();
} }
/// <summary> /// <summary>

View File

@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Cryptography; using System.Security.Cryptography;
using Org.OpenAPITools.Client; using Org.OpenAPITools.Client;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Extensions; using Org.OpenAPITools.Extensions;
using Xunit; using Xunit;
@ -122,25 +122,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithAClientTest() public void ConfigureApiWithAClientTest()
{ {
var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
@ -150,25 +150,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithoutAClientTest() public void ConfigureApiWithoutAClientTest()
{ {
var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
@ -178,25 +178,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithAClientTest() public void AddApiWithAClientTest()
{ {
var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
@ -206,25 +206,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithoutAClientTest() public void AddApiWithoutAClientTest()
{ {
var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
} }

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class FakeApiTests : ApiTestsBase public sealed class FakeApiTests : ApiTestsBase
{ {
private readonly IApi.IFakeApi _instance; private readonly IFakeApi _instance;
public FakeApiTests(): base(Array.Empty<string>()) public FakeApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IFakeApi>(); _instance = _host.Services.GetRequiredService<IFakeApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class FakeClassnameTags123ApiTests : ApiTestsBase public sealed class FakeClassnameTags123ApiTests : ApiTestsBase
{ {
private readonly IApi.IFakeClassnameTags123Api _instance; private readonly IFakeClassnameTags123Api _instance;
public FakeClassnameTags123ApiTests(): base(Array.Empty<string>()) public FakeClassnameTags123ApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); _instance = _host.Services.GetRequiredService<IFakeClassnameTags123Api>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class PetApiTests : ApiTestsBase public sealed class PetApiTests : ApiTestsBase
{ {
private readonly IApi.IPetApi _instance; private readonly IPetApi _instance;
public PetApiTests(): base(Array.Empty<string>()) public PetApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IPetApi>(); _instance = _host.Services.GetRequiredService<IPetApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class StoreApiTests : ApiTestsBase public sealed class StoreApiTests : ApiTestsBase
{ {
private readonly IApi.IStoreApi _instance; private readonly IStoreApi _instance;
public StoreApiTests(): base(Array.Empty<string>()) public StoreApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IStoreApi>(); _instance = _host.Services.GetRequiredService<IStoreApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class UserApiTests : ApiTestsBase public sealed class UserApiTests : ApiTestsBase
{ {
private readonly IApi.IUserApi _instance; private readonly IUserApi _instance;
public UserApiTests(): base(Array.Empty<string>()) public UserApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IUserApi>(); _instance = _host.Services.GetRequiredService<IUserApi>();
} }
/// <summary> /// <summary>

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;&gt;</returns>
Task<ApiResponse<ModelClient>> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<ModelClient>> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class AnotherFakeApi : IApi.IAnotherFakeApi public sealed partial class AnotherFakeApi : IAnotherFakeApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -98,10 +98,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;&gt;</returns>
Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -172,7 +169,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class DefaultApi : IApi.IDefaultApi public sealed partial class DefaultApi : IDefaultApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -446,10 +446,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;object&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;object&gt;&gt;</returns>
Task<ApiResponse<object>> TestQueryParameterCollectionFormatOrDefaultAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable = default, Option<string> notRequiredNotNullable = default, Option<string> notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<object>> TestQueryParameterCollectionFormatOrDefaultAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable = default, Option<string> notRequiredNotNullable = default, Option<string> notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -760,7 +757,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class FakeApi : IApi.IFakeApi public sealed partial class FakeApi : IFakeApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;&gt;</returns>
Task<ApiResponse<ModelClient>> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<ModelClient>> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class FakeClassnameTags123Api : IApi.IFakeClassnameTags123Api public sealed partial class FakeClassnameTags123Api : IFakeClassnameTags123Api
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -1,6 +1,6 @@
using System.Net.Http; using System.Net.Http;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Any Api client /// Any Api client

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -254,10 +254,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;ApiResponse&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;ApiResponse&gt;&gt;</returns>
Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata = default, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata = default, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -448,7 +445,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class PetApi : IApi.IPetApi public sealed partial class PetApi : IPetApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -123,10 +123,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;Order&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;Order&gt;&gt;</returns>
Task<ApiResponse<Order>> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<Order>> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -217,7 +214,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class StoreApi : IApi.IStoreApi public sealed partial class StoreApi : IStoreApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -219,10 +219,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;object&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;object&gt;&gt;</returns>
Task<ApiResponse<object>> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<object>> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -393,7 +390,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class UserApi : IApi.IUserApi public sealed partial class UserApi : IUserApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -1,6 +1,6 @@
using System; using System;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client
{ {
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
IResult Create<IResult>() where IResult : IApi.IApi; IResult Create<IResult>() where IResult : IApi;
} }
/// <summary> /// <summary>
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
public IResult Create<IResult>() where IResult : IApi.IApi public IResult Create<IResult>() where IResult : IApi
{ {
return Services.GetRequiredService<IResult>(); return Services.GetRequiredService<IResult>();
} }

View File

@ -15,7 +15,6 @@ using System.Text.Json.Serialization;
using System.Net.Http; using System.Net.Http;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.IApi;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class DefaultApiTests : ApiTestsBase public sealed class DefaultApiTests : ApiTestsBase
{ {
private readonly IApi.IDefaultApi _instance; private readonly IDefaultApi _instance;
public DefaultApiTests(): base(Array.Empty<string>()) public DefaultApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>(); _instance = _host.Services.GetRequiredService<IDefaultApi>();
} }
/// <summary> /// <summary>

View File

@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Cryptography; using System.Security.Cryptography;
using Org.OpenAPITools.Client; using Org.OpenAPITools.Client;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Extensions; using Org.OpenAPITools.Extensions;
using Xunit; using Xunit;
@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithAClientTest() public void ConfigureApiWithAClientTest()
{ {
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithoutAClientTest() public void ConfigureApiWithoutAClientTest()
{ {
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithAClientTest() public void AddApiWithAClientTest()
{ {
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
@ -96,7 +96,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithoutAClientTest() public void AddApiWithoutAClientTest()
{ {
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
} }

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -58,10 +58,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;Person&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;Person&gt;?&gt;</returns>
Task<ApiResponse<Person>?> ListOrDefaultAsync(string personId, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<Person>?> ListOrDefaultAsync(string personId, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -92,7 +89,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class DefaultApi : IApi.IDefaultApi public sealed partial class DefaultApi : IDefaultApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -1,6 +1,6 @@
using System.Net.Http; using System.Net.Http;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Any Api client /// Any Api client

View File

@ -1,6 +1,6 @@
using System; using System;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client
{ {
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
IResult Create<IResult>() where IResult : IApi.IApi; IResult Create<IResult>() where IResult : IApi;
} }
/// <summary> /// <summary>
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
public IResult Create<IResult>() where IResult : IApi.IApi public IResult Create<IResult>() where IResult : IApi
{ {
return Services.GetRequiredService<IResult>(); return Services.GetRequiredService<IResult>();
} }

View File

@ -17,7 +17,6 @@ using System.Text.Json.Serialization;
using System.Net.Http; using System.Net.Http;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.IApi;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class DefaultApiTests : ApiTestsBase public sealed class DefaultApiTests : ApiTestsBase
{ {
private readonly IApi.IDefaultApi _instance; private readonly IDefaultApi _instance;
public DefaultApiTests(): base(Array.Empty<string>()) public DefaultApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>(); _instance = _host.Services.GetRequiredService<IDefaultApi>();
} }
/// <summary> /// <summary>

View File

@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Cryptography; using System.Security.Cryptography;
using Org.OpenAPITools.Client; using Org.OpenAPITools.Client;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Extensions; using Org.OpenAPITools.Extensions;
using Xunit; using Xunit;
@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithAClientTest() public void ConfigureApiWithAClientTest()
{ {
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithoutAClientTest() public void ConfigureApiWithoutAClientTest()
{ {
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithAClientTest() public void AddApiWithAClientTest()
{ {
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
@ -96,7 +96,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithoutAClientTest() public void AddApiWithoutAClientTest()
{ {
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
} }

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;Fruit&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;Fruit&gt;?&gt;</returns>
Task<ApiResponse<Fruit>?> RootGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<Fruit>?> RootGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class DefaultApi : IApi.IDefaultApi public sealed partial class DefaultApi : IDefaultApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -1,6 +1,6 @@
using System.Net.Http; using System.Net.Http;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Any Api client /// Any Api client

View File

@ -1,6 +1,6 @@
using System; using System;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client
{ {
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
IResult Create<IResult>() where IResult : IApi.IApi; IResult Create<IResult>() where IResult : IApi;
} }
/// <summary> /// <summary>
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
public IResult Create<IResult>() where IResult : IApi.IApi public IResult Create<IResult>() where IResult : IApi
{ {
return Services.GetRequiredService<IResult>(); return Services.GetRequiredService<IResult>();
} }

View File

@ -17,7 +17,6 @@ using System.Text.Json.Serialization;
using System.Net.Http; using System.Net.Http;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.IApi;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class DefaultApiTests : ApiTestsBase public sealed class DefaultApiTests : ApiTestsBase
{ {
private readonly IApi.IDefaultApi _instance; private readonly IDefaultApi _instance;
public DefaultApiTests(): base(Array.Empty<string>()) public DefaultApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>(); _instance = _host.Services.GetRequiredService<IDefaultApi>();
} }
/// <summary> /// <summary>

View File

@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Cryptography; using System.Security.Cryptography;
using Org.OpenAPITools.Client; using Org.OpenAPITools.Client;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Extensions; using Org.OpenAPITools.Extensions;
using Xunit; using Xunit;
@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithAClientTest() public void ConfigureApiWithAClientTest()
{ {
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithoutAClientTest() public void ConfigureApiWithoutAClientTest()
{ {
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithAClientTest() public void AddApiWithAClientTest()
{ {
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
@ -96,7 +96,7 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithoutAClientTest() public void AddApiWithoutAClientTest()
{ {
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
} }
} }

View File

@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;Fruit&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;Fruit&gt;?&gt;</returns>
Task<ApiResponse<Fruit>?> RootGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<Fruit>?> RootGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class DefaultApi : IApi.IDefaultApi public sealed partial class DefaultApi : IDefaultApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -1,6 +1,6 @@
using System.Net.Http; using System.Net.Http;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Any Api client /// Any Api client

View File

@ -1,6 +1,6 @@
using System; using System;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client
{ {
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
IResult Create<IResult>() where IResult : IApi.IApi; IResult Create<IResult>() where IResult : IApi;
} }
/// <summary> /// <summary>
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
public IResult Create<IResult>() where IResult : IApi.IApi public IResult Create<IResult>() where IResult : IApi
{ {
return Services.GetRequiredService<IResult>(); return Services.GetRequiredService<IResult>();
} }

View File

@ -17,7 +17,6 @@ using System.Text.Json.Serialization;
using System.Net.Http; using System.Net.Http;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.IApi;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class AnotherFakeApiTests : ApiTestsBase public sealed class AnotherFakeApiTests : ApiTestsBase
{ {
private readonly IApi.IAnotherFakeApi _instance; private readonly IAnotherFakeApi _instance;
public AnotherFakeApiTests(): base(Array.Empty<string>()) public AnotherFakeApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IAnotherFakeApi>(); _instance = _host.Services.GetRequiredService<IAnotherFakeApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class DefaultApiTests : ApiTestsBase public sealed class DefaultApiTests : ApiTestsBase
{ {
private readonly IApi.IDefaultApi _instance; private readonly IDefaultApi _instance;
public DefaultApiTests(): base(Array.Empty<string>()) public DefaultApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>(); _instance = _host.Services.GetRequiredService<IDefaultApi>();
} }
/// <summary> /// <summary>

View File

@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Cryptography; using System.Security.Cryptography;
using Org.OpenAPITools.Client; using Org.OpenAPITools.Client;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Extensions; using Org.OpenAPITools.Extensions;
using Xunit; using Xunit;
@ -122,25 +122,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithAClientTest() public void ConfigureApiWithAClientTest()
{ {
var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
@ -150,25 +150,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void ConfigureApiWithoutAClientTest() public void ConfigureApiWithoutAClientTest()
{ {
var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
@ -178,25 +178,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithAClientTest() public void AddApiWithAClientTest()
{ {
var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
@ -206,25 +206,25 @@ namespace Org.OpenAPITools.Test.Api
[Fact] [Fact]
public void AddApiWithoutAClientTest() public void AddApiWithoutAClientTest()
{ {
var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>(); var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>(); var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IDefaultApi>();
Assert.True(defaultApi.HttpClient.BaseAddress != null); Assert.True(defaultApi.HttpClient.BaseAddress != null);
var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>(); var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IFakeApi>();
Assert.True(fakeApi.HttpClient.BaseAddress != null); Assert.True(fakeApi.HttpClient.BaseAddress != null);
var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService<IFakeClassnameTags123Api>();
Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IPetApi>(); var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IPetApi>();
Assert.True(petApi.HttpClient.BaseAddress != null); Assert.True(petApi.HttpClient.BaseAddress != null);
var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IStoreApi>(); var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IStoreApi>();
Assert.True(storeApi.HttpClient.BaseAddress != null); Assert.True(storeApi.HttpClient.BaseAddress != null);
var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IUserApi>(); var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IUserApi>();
Assert.True(userApi.HttpClient.BaseAddress != null); Assert.True(userApi.HttpClient.BaseAddress != null);
} }
} }

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class FakeApiTests : ApiTestsBase public sealed class FakeApiTests : ApiTestsBase
{ {
private readonly IApi.IFakeApi _instance; private readonly IFakeApi _instance;
public FakeApiTests(): base(Array.Empty<string>()) public FakeApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IFakeApi>(); _instance = _host.Services.GetRequiredService<IFakeApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class FakeClassnameTags123ApiTests : ApiTestsBase public sealed class FakeClassnameTags123ApiTests : ApiTestsBase
{ {
private readonly IApi.IFakeClassnameTags123Api _instance; private readonly IFakeClassnameTags123Api _instance;
public FakeClassnameTags123ApiTests(): base(Array.Empty<string>()) public FakeClassnameTags123ApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>(); _instance = _host.Services.GetRequiredService<IFakeClassnameTags123Api>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class PetApiTests : ApiTestsBase public sealed class PetApiTests : ApiTestsBase
{ {
private readonly IApi.IPetApi _instance; private readonly IPetApi _instance;
public PetApiTests(): base(Array.Empty<string>()) public PetApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IPetApi>(); _instance = _host.Services.GetRequiredService<IPetApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class StoreApiTests : ApiTestsBase public sealed class StoreApiTests : ApiTestsBase
{ {
private readonly IApi.IStoreApi _instance; private readonly IStoreApi _instance;
public StoreApiTests(): base(Array.Empty<string>()) public StoreApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IStoreApi>(); _instance = _host.Services.GetRequiredService<IStoreApi>();
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.IApi; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
/// </summary> /// </summary>
public sealed class UserApiTests : ApiTestsBase public sealed class UserApiTests : ApiTestsBase
{ {
private readonly IApi.IUserApi _instance; private readonly IUserApi _instance;
public UserApiTests(): base(Array.Empty<string>()) public UserApiTests(): base(Array.Empty<string>())
{ {
_instance = _host.Services.GetRequiredService<IApi.IUserApi>(); _instance = _host.Services.GetRequiredService<IUserApi>();
} }
/// <summary> /// <summary>

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;&gt;</returns>
Task<ApiResponse<ModelClient>> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<ModelClient>> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class AnotherFakeApi : IApi.IAnotherFakeApi public sealed partial class AnotherFakeApi : IAnotherFakeApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -98,10 +98,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;&gt;</returns>
Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -172,7 +169,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class DefaultApi : IApi.IDefaultApi public sealed partial class DefaultApi : IDefaultApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -446,10 +446,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;object&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;object&gt;&gt;</returns>
Task<ApiResponse<object>> TestQueryParameterCollectionFormatOrDefaultAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable = default, Option<string> notRequiredNotNullable = default, Option<string> notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<object>> TestQueryParameterCollectionFormatOrDefaultAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable = default, Option<string> notRequiredNotNullable = default, Option<string> notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -760,7 +757,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class FakeApi : IApi.IFakeApi public sealed partial class FakeApi : IFakeApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;ModelClient&gt;&gt;</returns>
Task<ApiResponse<ModelClient>> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<ModelClient>> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class FakeClassnameTags123Api : IApi.IFakeClassnameTags123Api public sealed partial class FakeClassnameTags123Api : IFakeClassnameTags123Api
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -1,6 +1,6 @@
using System.Net.Http; using System.Net.Http;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Any Api client /// Any Api client

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -254,10 +254,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;ApiResponse&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;ApiResponse&gt;&gt;</returns>
Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata = default, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata = default, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -448,7 +445,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class PetApi : IApi.IPetApi public sealed partial class PetApi : IPetApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -123,10 +123,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;Order&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;Order&gt;&gt;</returns>
Task<ApiResponse<Order>> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<Order>> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -217,7 +214,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class StoreApi : IApi.IStoreApi public sealed partial class StoreApi : IStoreApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.IApi namespace Org.OpenAPITools.Api
{ {
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
@ -219,10 +219,7 @@ namespace Org.OpenAPITools.IApi
/// <returns>Task&lt;ApiResponse&gt;object&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;object&gt;&gt;</returns>
Task<ApiResponse<object>> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<object>> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
} }
}
namespace Org.OpenAPITools.Api
{
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// This class is registered as transient. /// This class is registered as transient.
@ -393,7 +390,7 @@ namespace Org.OpenAPITools.Api
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
public sealed partial class UserApi : IApi.IUserApi public sealed partial class UserApi : IUserApi
{ {
private JsonSerializerOptions _jsonSerializerOptions; private JsonSerializerOptions _jsonSerializerOptions;

View File

@ -1,6 +1,6 @@
using System; using System;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client
{ {
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
IResult Create<IResult>() where IResult : IApi.IApi; IResult Create<IResult>() where IResult : IApi;
} }
/// <summary> /// <summary>
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
/// </summary> /// </summary>
/// <typeparam name="IResult"></typeparam> /// <typeparam name="IResult"></typeparam>
/// <returns></returns> /// <returns></returns>
public IResult Create<IResult>() where IResult : IApi.IApi public IResult Create<IResult>() where IResult : IApi
{ {
return Services.GetRequiredService<IResult>(); return Services.GetRequiredService<IResult>();
} }

View File

@ -15,7 +15,6 @@ using System.Text.Json.Serialization;
using System.Net.Http; using System.Net.Http;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.IApi;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client