forked from loafle/openapi-generator-original
removed IApi namespace (#16058)
This commit is contained in:
parent
9362b49173
commit
ceb48d3af4
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using {{packageName}}.{{apiPackage}};
|
||||
|
||||
namespace {{packageName}}.{{clientPackage}}
|
||||
{
|
||||
@ -14,7 +14,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
IResult Create<IResult>() where IResult : {{interfacePrefix}}{{apiPackage}}.IApi;
|
||||
IResult Create<IResult>() where IResult : IApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -41,7 +41,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
public IResult Create<IResult>() where IResult : {{interfacePrefix}}{{apiPackage}}.IApi
|
||||
public IResult Create<IResult>() where IResult : IApi
|
||||
{
|
||||
return Services.GetRequiredService<IResult>();
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using {{packageName}}.{{clientPackage}};
|
||||
using {{packageName}}.{{interfacePrefix}}{{apiPackage}};
|
||||
using {{packageName}}.{{apiPackage}};
|
||||
using {{packageName}}.Extensions;
|
||||
using Xunit;
|
||||
|
||||
@ -114,7 +114,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
||||
[Fact]
|
||||
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}}
|
||||
|
||||
{{/-last}}{{/apis}}{{/apiInfo}}
|
||||
@ -126,7 +126,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
||||
[Fact]
|
||||
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}}
|
||||
|
||||
{{/-last}}{{/apis}}{{/apiInfo}}
|
||||
@ -138,7 +138,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
||||
[Fact]
|
||||
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}}
|
||||
|
||||
{{/-last}}{{/apis}}{{/apiInfo}}
|
||||
@ -150,7 +150,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
||||
[Fact]
|
||||
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}}
|
||||
|
||||
{{/-last}}{{/apis}}{{/apiInfo}}
|
||||
|
@ -11,7 +11,6 @@ using System.Text.Json.Serialization;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using {{packageName}}.{{apiPackage}};
|
||||
using {{packageName}}.{{interfacePrefix}}{{apiPackage}};
|
||||
using {{packageName}}.{{modelPackage}};
|
||||
|
||||
namespace {{packageName}}.{{clientPackage}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Net.Http;
|
||||
|
||||
namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}}
|
||||
namespace {{packageName}}.{{apiPackage}}
|
||||
{
|
||||
/// <summary>
|
||||
/// Any Api client
|
||||
|
@ -18,7 +18,7 @@ using {{packageName}}.{{apiPackage}};
|
||||
using {{packageName}}.{{modelPackage}};
|
||||
{{/hasImport}}
|
||||
|
||||
namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}}
|
||||
namespace {{packageName}}.{{apiPackage}}
|
||||
{
|
||||
{{#operations}}
|
||||
/// <summary>
|
||||
@ -64,10 +64,7 @@ namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}}
|
||||
{{/-last}}
|
||||
{{/operation}}
|
||||
}
|
||||
}
|
||||
|
||||
namespace {{packageName}}.{{apiPackage}}
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -103,7 +100,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
{{>visibility}} sealed partial class {{classname}} : {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}
|
||||
{{>visibility}} sealed partial class {{classname}} : {{interfacePrefix}}{{classname}}
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using {{packageName}}.{{interfacePrefix}}{{apiPackage}};{{#hasImport}}
|
||||
using {{packageName}}.{{apiPackage}};{{#hasImport}}
|
||||
using {{packageName}}.{{modelPackage}};{{/hasImport}}
|
||||
|
||||
|
||||
@ -18,11 +18,11 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
||||
/// </summary>
|
||||
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>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>();
|
||||
_instance = _host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
||||
}
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class AnotherFakeApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IAnotherFakeApi _instance;
|
||||
private readonly IAnotherFakeApi _instance;
|
||||
|
||||
public AnotherFakeApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
_instance = _host.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class DefaultApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IDefaultApi _instance;
|
||||
private readonly IDefaultApi _instance;
|
||||
|
||||
public DefaultApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
_instance = _host.Services.GetRequiredService<IDefaultApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Extensions;
|
||||
using Xunit;
|
||||
|
||||
@ -122,25 +122,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -150,25 +150,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithoutAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -178,25 +178,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -206,25 +206,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithoutAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class FakeApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IFakeApi _instance;
|
||||
private readonly IFakeApi _instance;
|
||||
|
||||
public FakeApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
_instance = _host.Services.GetRequiredService<IFakeApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class FakeClassnameTags123ApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IFakeClassnameTags123Api _instance;
|
||||
private readonly IFakeClassnameTags123Api _instance;
|
||||
|
||||
public FakeClassnameTags123ApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>();
|
||||
_instance = _host.Services.GetRequiredService<IFakeClassnameTags123Api>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class PetApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IPetApi _instance;
|
||||
private readonly IPetApi _instance;
|
||||
|
||||
public PetApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IPetApi>();
|
||||
_instance = _host.Services.GetRequiredService<IPetApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class StoreApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IStoreApi _instance;
|
||||
private readonly IStoreApi _instance;
|
||||
|
||||
public StoreApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IStoreApi>();
|
||||
_instance = _host.Services.GetRequiredService<IStoreApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class UserApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IUserApi _instance;
|
||||
private readonly IUserApi _instance;
|
||||
|
||||
public UserApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IUserApi>();
|
||||
_instance = _host.Services.GetRequiredService<IUserApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -58,10 +58,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>ModelClient>?></returns>
|
||||
Task<ApiResponse<ModelClient>?> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -92,7 +89,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class AnotherFakeApi : IApi.IAnotherFakeApi
|
||||
public sealed partial class AnotherFakeApi : IAnotherFakeApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -100,10 +100,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>List<Guid>>?></returns>
|
||||
Task<ApiResponse<List<Guid>>?> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -174,7 +171,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class DefaultApi : IApi.IDefaultApi
|
||||
public sealed partial class DefaultApi : IDefaultApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -448,10 +448,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>object>?></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);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -762,7 +759,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class FakeApi : IApi.IFakeApi
|
||||
public sealed partial class FakeApi : IFakeApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -58,10 +58,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>ModelClient>?></returns>
|
||||
Task<ApiResponse<ModelClient>?> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -92,7 +89,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class FakeClassnameTags123Api : IApi.IFakeClassnameTags123Api
|
||||
public sealed partial class FakeClassnameTags123Api : IFakeClassnameTags123Api
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Any Api client
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -256,10 +256,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>ApiResponse>?></returns>
|
||||
Task<ApiResponse<ApiResponse>?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata = default, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -450,7 +447,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class PetApi : IApi.IPetApi
|
||||
public sealed partial class PetApi : IPetApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -125,10 +125,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>Order>?></returns>
|
||||
Task<ApiResponse<Order>?> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -219,7 +216,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class StoreApi : IApi.IStoreApi
|
||||
public sealed partial class StoreApi : IStoreApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -221,10 +221,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -395,7 +392,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class UserApi : IApi.IUserApi
|
||||
public sealed partial class UserApi : IUserApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using Org.OpenAPITools.Api;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
IResult Create<IResult>() where IResult : IApi.IApi;
|
||||
IResult Create<IResult>() where IResult : IApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
public IResult Create<IResult>() where IResult : IApi.IApi
|
||||
public IResult Create<IResult>() where IResult : IApi
|
||||
{
|
||||
return Services.GetRequiredService<IResult>();
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ using System.Text.Json.Serialization;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class AnotherFakeApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IAnotherFakeApi _instance;
|
||||
private readonly IAnotherFakeApi _instance;
|
||||
|
||||
public AnotherFakeApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
_instance = _host.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class DefaultApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IDefaultApi _instance;
|
||||
private readonly IDefaultApi _instance;
|
||||
|
||||
public DefaultApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
_instance = _host.Services.GetRequiredService<IDefaultApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Extensions;
|
||||
using Xunit;
|
||||
|
||||
@ -122,25 +122,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -150,25 +150,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithoutAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -178,25 +178,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -206,25 +206,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithoutAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class FakeApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IFakeApi _instance;
|
||||
private readonly IFakeApi _instance;
|
||||
|
||||
public FakeApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
_instance = _host.Services.GetRequiredService<IFakeApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class FakeClassnameTags123ApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IFakeClassnameTags123Api _instance;
|
||||
private readonly IFakeClassnameTags123Api _instance;
|
||||
|
||||
public FakeClassnameTags123ApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>();
|
||||
_instance = _host.Services.GetRequiredService<IFakeClassnameTags123Api>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class PetApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IPetApi _instance;
|
||||
private readonly IPetApi _instance;
|
||||
|
||||
public PetApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IPetApi>();
|
||||
_instance = _host.Services.GetRequiredService<IPetApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class StoreApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IStoreApi _instance;
|
||||
private readonly IStoreApi _instance;
|
||||
|
||||
public StoreApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IStoreApi>();
|
||||
_instance = _host.Services.GetRequiredService<IStoreApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class UserApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IUserApi _instance;
|
||||
private readonly IUserApi _instance;
|
||||
|
||||
public UserApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IUserApi>();
|
||||
_instance = _host.Services.GetRequiredService<IUserApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>ModelClient>></returns>
|
||||
Task<ApiResponse<ModelClient>> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class AnotherFakeApi : IApi.IAnotherFakeApi
|
||||
public sealed partial class AnotherFakeApi : IAnotherFakeApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -98,10 +98,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>List<Guid>>></returns>
|
||||
Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -172,7 +169,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class DefaultApi : IApi.IDefaultApi
|
||||
public sealed partial class DefaultApi : IDefaultApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -446,10 +446,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>object>></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);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -760,7 +757,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class FakeApi : IApi.IFakeApi
|
||||
public sealed partial class FakeApi : IFakeApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>ModelClient>></returns>
|
||||
Task<ApiResponse<ModelClient>> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class FakeClassnameTags123Api : IApi.IFakeClassnameTags123Api
|
||||
public sealed partial class FakeClassnameTags123Api : IFakeClassnameTags123Api
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Any Api client
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -254,10 +254,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>ApiResponse>></returns>
|
||||
Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata = default, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -448,7 +445,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class PetApi : IApi.IPetApi
|
||||
public sealed partial class PetApi : IPetApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -123,10 +123,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>Order>></returns>
|
||||
Task<ApiResponse<Order>> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -217,7 +214,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class StoreApi : IApi.IStoreApi
|
||||
public sealed partial class StoreApi : IStoreApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -219,10 +219,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>object>></returns>
|
||||
Task<ApiResponse<object>> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -393,7 +390,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class UserApi : IApi.IUserApi
|
||||
public sealed partial class UserApi : IUserApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using Org.OpenAPITools.Api;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
IResult Create<IResult>() where IResult : IApi.IApi;
|
||||
IResult Create<IResult>() where IResult : IApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
public IResult Create<IResult>() where IResult : IApi.IApi
|
||||
public IResult Create<IResult>() where IResult : IApi
|
||||
{
|
||||
return Services.GetRequiredService<IResult>();
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ using System.Text.Json.Serialization;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class DefaultApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IDefaultApi _instance;
|
||||
private readonly IDefaultApi _instance;
|
||||
|
||||
public DefaultApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
_instance = _host.Services.GetRequiredService<IDefaultApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Extensions;
|
||||
using Xunit;
|
||||
|
||||
@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithoutAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithoutAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -58,10 +58,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>Person>?></returns>
|
||||
Task<ApiResponse<Person>?> ListOrDefaultAsync(string personId, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -92,7 +89,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class DefaultApi : IApi.IDefaultApi
|
||||
public sealed partial class DefaultApi : IDefaultApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Any Api client
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using Org.OpenAPITools.Api;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
IResult Create<IResult>() where IResult : IApi.IApi;
|
||||
IResult Create<IResult>() where IResult : IApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
public IResult Create<IResult>() where IResult : IApi.IApi
|
||||
public IResult Create<IResult>() where IResult : IApi
|
||||
{
|
||||
return Services.GetRequiredService<IResult>();
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ using System.Text.Json.Serialization;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class DefaultApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IDefaultApi _instance;
|
||||
private readonly IDefaultApi _instance;
|
||||
|
||||
public DefaultApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
_instance = _host.Services.GetRequiredService<IDefaultApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Extensions;
|
||||
using Xunit;
|
||||
|
||||
@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithoutAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithoutAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>Fruit>?></returns>
|
||||
Task<ApiResponse<Fruit>?> RootGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class DefaultApi : IApi.IDefaultApi
|
||||
public sealed partial class DefaultApi : IDefaultApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Any Api client
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using Org.OpenAPITools.Api;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
IResult Create<IResult>() where IResult : IApi.IApi;
|
||||
IResult Create<IResult>() where IResult : IApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
public IResult Create<IResult>() where IResult : IApi.IApi
|
||||
public IResult Create<IResult>() where IResult : IApi
|
||||
{
|
||||
return Services.GetRequiredService<IResult>();
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ using System.Text.Json.Serialization;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class DefaultApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IDefaultApi _instance;
|
||||
private readonly IDefaultApi _instance;
|
||||
|
||||
public DefaultApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
_instance = _host.Services.GetRequiredService<IDefaultApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Extensions;
|
||||
using Xunit;
|
||||
|
||||
@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithoutAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithoutAClientTest()
|
||||
{
|
||||
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IDefaultApi>();
|
||||
Assert.True(defaultApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>Fruit>?></returns>
|
||||
Task<ApiResponse<Fruit>?> RootGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class DefaultApi : IApi.IDefaultApi
|
||||
public sealed partial class DefaultApi : IDefaultApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Any Api client
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using Org.OpenAPITools.Api;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
IResult Create<IResult>() where IResult : IApi.IApi;
|
||||
IResult Create<IResult>() where IResult : IApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
public IResult Create<IResult>() where IResult : IApi.IApi
|
||||
public IResult Create<IResult>() where IResult : IApi
|
||||
{
|
||||
return Services.GetRequiredService<IResult>();
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ using System.Text.Json.Serialization;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class AnotherFakeApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IAnotherFakeApi _instance;
|
||||
private readonly IAnotherFakeApi _instance;
|
||||
|
||||
public AnotherFakeApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
_instance = _host.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class DefaultApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IDefaultApi _instance;
|
||||
private readonly IDefaultApi _instance;
|
||||
|
||||
public DefaultApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IDefaultApi>();
|
||||
_instance = _host.Services.GetRequiredService<IDefaultApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Extensions;
|
||||
using Xunit;
|
||||
|
||||
@ -122,25 +122,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -150,25 +150,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void ConfigureApiWithoutAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -178,25 +178,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingAddWithAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingAddWithAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
|
||||
@ -206,25 +206,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void AddApiWithoutAClientTest()
|
||||
{
|
||||
var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IAnotherFakeApi>();
|
||||
var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IAnotherFakeApi>();
|
||||
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);
|
||||
|
||||
var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IFakeApi>();
|
||||
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);
|
||||
|
||||
var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IPetApi>();
|
||||
var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IPetApi>();
|
||||
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);
|
||||
|
||||
var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IApi.IUserApi>();
|
||||
var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService<IUserApi>();
|
||||
Assert.True(userApi.HttpClient.BaseAddress != null);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class FakeApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IFakeApi _instance;
|
||||
private readonly IFakeApi _instance;
|
||||
|
||||
public FakeApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IFakeApi>();
|
||||
_instance = _host.Services.GetRequiredService<IFakeApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class FakeClassnameTags123ApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IFakeClassnameTags123Api _instance;
|
||||
private readonly IFakeClassnameTags123Api _instance;
|
||||
|
||||
public FakeClassnameTags123ApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IFakeClassnameTags123Api>();
|
||||
_instance = _host.Services.GetRequiredService<IFakeClassnameTags123Api>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class PetApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IPetApi _instance;
|
||||
private readonly IPetApi _instance;
|
||||
|
||||
public PetApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IPetApi>();
|
||||
_instance = _host.Services.GetRequiredService<IPetApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class StoreApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IStoreApi _instance;
|
||||
private readonly IStoreApi _instance;
|
||||
|
||||
public StoreApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IStoreApi>();
|
||||
_instance = _host.Services.GetRequiredService<IStoreApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
|
||||
@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api
|
||||
/// </summary>
|
||||
public sealed class UserApiTests : ApiTestsBase
|
||||
{
|
||||
private readonly IApi.IUserApi _instance;
|
||||
private readonly IUserApi _instance;
|
||||
|
||||
public UserApiTests(): base(Array.Empty<string>())
|
||||
{
|
||||
_instance = _host.Services.GetRequiredService<IApi.IUserApi>();
|
||||
_instance = _host.Services.GetRequiredService<IUserApi>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>ModelClient>></returns>
|
||||
Task<ApiResponse<ModelClient>> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class AnotherFakeApi : IApi.IAnotherFakeApi
|
||||
public sealed partial class AnotherFakeApi : IAnotherFakeApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -98,10 +98,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>List<Guid>>></returns>
|
||||
Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -172,7 +169,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class DefaultApi : IApi.IDefaultApi
|
||||
public sealed partial class DefaultApi : IDefaultApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -446,10 +446,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>object>></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);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -760,7 +757,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class FakeApi : IApi.IFakeApi
|
||||
public sealed partial class FakeApi : IFakeApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -56,10 +56,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>ModelClient>></returns>
|
||||
Task<ApiResponse<ModelClient>> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -90,7 +87,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class FakeClassnameTags123Api : IApi.IFakeClassnameTags123Api
|
||||
public sealed partial class FakeClassnameTags123Api : IFakeClassnameTags123Api
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Any Api client
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -254,10 +254,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>ApiResponse>></returns>
|
||||
Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata = default, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -448,7 +445,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class PetApi : IApi.IPetApi
|
||||
public sealed partial class PetApi : IPetApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -123,10 +123,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>Order>></returns>
|
||||
Task<ApiResponse<Order>> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -217,7 +214,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class StoreApi : IApi.IStoreApi
|
||||
public sealed partial class StoreApi : IStoreApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.IApi
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -219,10 +219,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <returns>Task<ApiResponse>object>></returns>
|
||||
Task<ApiResponse<object>> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// This class is registered as transient.
|
||||
@ -393,7 +390,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public sealed partial class UserApi : IApi.IUserApi
|
||||
public sealed partial class UserApi : IUserApi
|
||||
{
|
||||
private JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using Org.OpenAPITools.Api;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -14,7 +14,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
IResult Create<IResult>() where IResult : IApi.IApi;
|
||||
IResult Create<IResult>() where IResult : IApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <typeparam name="IResult"></typeparam>
|
||||
/// <returns></returns>
|
||||
public IResult Create<IResult>() where IResult : IApi.IApi
|
||||
public IResult Create<IResult>() where IResult : IApi
|
||||
{
|
||||
return Services.GetRequiredService<IResult>();
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ using System.Text.Json.Serialization;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.IApi;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
|
Loading…
x
Reference in New Issue
Block a user