Browse Source

Merge pull request #26320 from abpframework/auto-merge-forward/rel-10.7-to-dev-97

Auto-merge forward rel-10.7 → dev
pull/26321/head
Ma Liming 1 month ago
committed by GitHub
parent
commit
4e3598c92a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      framework/Volo.Abp.slnx
  2. 50
      framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs
  3. 3
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.abppkg
  4. 22
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.csproj
  5. 8
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestBase.cs
  6. 41
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs
  7. 577
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention_Tests.cs
  8. 719
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/client-proxy-test-generate-proxy.json
  9. 10
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Program.cs

1
framework/Volo.Abp.slnx

@ -231,6 +231,7 @@
<Project Path="test/Volo.Abp.GlobalFeatures.Tests/Volo.Abp.GlobalFeatures.Tests.csproj" />
<Project Path="test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj" />
<Project Path="test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj" />
<Project Path="test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.csproj" />
<Project Path="test/Volo.Abp.Http.FluentValidation.Tests/Volo.Abp.Http.FluentValidation.Tests.csproj" />
<Project Path="test/Volo.Abp.Http.Tests/Volo.Abp.Http.Tests.csproj" />
<Project Path="test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj" />

50
framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs

@ -15,6 +15,7 @@ using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Client.StaticProxying;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Http.ProxyScripting.Generators;
using Volo.Abp.Reflection;
namespace Volo.Abp.Http.Client.Web.Conventions;
@ -72,11 +73,39 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention
}
ConfigureClientProxySelector(controller);
RemoveConventionalSelectors(controller);
ConfigureClientProxyApiExplorer(controller);
ConfigureClientProxyParameters(controller);
ConfigureParameters(controller);
}
}
protected virtual void ConfigureClientProxyParameters(ControllerModel controller)
{
foreach (var action in controller.Actions)
{
var actionApiDescriptionModel = FindActionApiDescriptionModel(controller, action);
if (actionApiDescriptionModel == null)
{
continue;
}
foreach (var prm in action.Parameters)
{
if (prm.BindingInfo != null)
{
continue;
}
// Clients send the parameter where the remote action reads it, so a primitive [FromBody] parameter has to be read from the body here too.
if (actionApiDescriptionModel.Parameters.Any(x => x.NameOnMethod == prm.ParameterName && x.BindingSourceId == ParameterBindingSources.Body))
{
prm.BindingInfo = BindingInfo.GetBindingInfo(new[] { new FromBodyAttribute() });
}
}
}
}
protected override void ConfigureParameters(ControllerModel controller)
{
foreach (var action in controller.Actions)
@ -201,6 +230,22 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention
}
}
protected virtual void RemoveConventionalSelectors(ControllerModel controller)
{
if (controller.Selectors.Any(selector => selector.AttributeRouteModel != null))
{
return;
}
foreach (var action in controller.Actions)
{
action.Selectors
.Where(selector => selector.AttributeRouteModel == null)
.ToList()
.ForEach(selector => action.Selectors.Remove(selector));
}
}
protected virtual void ConfigureClientProxyApiExplorer(ControllerModel controller)
{
if (ControllerWithAttributeRoute.Contains(controller))
@ -218,10 +263,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention
foreach (var action in controller.Actions)
{
if (ActionWithAttributeRoute.Contains(action))
{
ConfigureApiExplorer(action);
}
ConfigureApiExplorer(action);
}
}

3
framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.abppkg

@ -0,0 +1,3 @@
{
"role": "lib.test"
}

22
framework/test/Volo.Abp.Http.Client.Web.Tests/Volo.Abp.Http.Client.Web.Tests.csproj

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.test.props" />
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<AssemblyName>Volo.Abp.Http.Client.Web.Tests</AssemblyName>
<PackageId>Volo.Abp.Http.Client.Web.Tests</PackageId>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.Http.Client.Web\Volo.Abp.Http.Client.Web.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Tests\Volo.Abp.AspNetCore.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Volo\Abp\Http\Client\Web\Conventions\client-proxy-test-generate-proxy.json" />
</ItemGroup>
</Project>

8
framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestBase.cs

@ -0,0 +1,8 @@
using Volo.Abp.AspNetCore;
namespace Volo.Abp.Http.Client.Web;
public abstract class AbpHttpClientWebTestBase : AbpAspNetCoreTestBase<Program>
{
}

41
framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs

@ -0,0 +1,41 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.TestBase;
using Volo.Abp.Autofac;
using Volo.Abp.Http.Client.StaticProxying;
using Volo.Abp.Http.Client.Web.Conventions;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.Http.Client.Web;
[DependsOn(
typeof(AbpHttpClientWebModule),
typeof(AbpAspNetCoreTestBaseModule),
typeof(AbpAutofacModule)
)]
public class AbpHttpClientWebTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddStaticHttpClientProxies(typeof(AbpHttpClientWebTestModule).Assembly);
Configure<AbpHttpClientStaticProxyingOptions>(options =>
{
options.BindingFromQueryTypes.Add(typeof(ClientProxyTestQueryInput));
});
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpHttpClientWebTestModule>();
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
app.UseRouting();
app.UseConfiguredEndpoints();
}
}

577
framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention_Tests.cs

@ -0,0 +1,577 @@
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ActionConstraints;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Shouldly;
using Volo.Abp.Application.Services;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Content;
using Volo.Abp.Http.Client.ClientProxying;
using Xunit;
namespace Volo.Abp.Http.Client.Web.Conventions;
public class AbpHttpClientProxyServiceConvention_Tests : AbpHttpClientWebTestBase
{
[Fact]
public async Task Should_Read_Primitive_Body_Parameter_From_Request_Body()
{
var response = await Client.PostAsync(
"/api/client-proxy-test/from-body",
new StringContent("\"Server=localhost;Database=Test\"", Encoding.UTF8, "application/json"));
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe("Server=localhost;Database=Test");
}
[Fact]
public async Task Should_Read_Non_String_Primitive_Body_Parameter_From_Request_Body()
{
var response = await Client.PostAsync(
"/api/client-proxy-test/number-from-body",
new StringContent("42", Encoding.UTF8, "application/json"));
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe("42");
}
[Fact]
public async Task Should_Keep_Reading_Other_Primitive_Parameters_From_Query_String()
{
var response = await Client.PostAsync("/api/client-proxy-test/from-query?value=test", null);
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe("test");
}
[Fact]
public async Task Should_Read_Primitive_Parameters_From_Query_String_In_Get_Actions()
{
var guid = Guid.NewGuid();
var response = await Client.GetAsync($"/api/client-proxy-test/query-parameters?number=42&flag=true&guid={guid}");
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe($"42:True:{guid}");
}
[Fact]
public async Task Should_Keep_Explicit_Binding_Attribute()
{
var response = await Client.PostAsync("/api/client-proxy-test/from-explicit-query?value=test", null);
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe("test");
}
[Fact]
public async Task Should_Read_Complex_Parameter_From_Request_Body()
{
var response = await Client.PostAsync(
"/api/client-proxy-test",
new StringContent("{\"name\":\"test\",\"value\":42}", Encoding.UTF8, "application/json"));
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe("test:42");
}
[Fact]
public async Task Should_Read_Id_From_Route_And_Complex_Parameter_From_Request_Body()
{
var id = Guid.NewGuid();
var response = await Client.PutAsync(
$"/api/client-proxy-test/{id}",
new StringContent("{\"name\":\"test\",\"value\":42}", Encoding.UTF8, "application/json"));
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe($"{id}:test:42");
}
[Fact]
public async Task Should_Read_Complex_Parameter_From_Query_String_In_Get_Actions()
{
var response = await Client.GetAsync("/api/client-proxy-test?Name=test&Value=42");
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe("test:42");
}
[Fact]
public async Task Should_Read_Binding_From_Query_Types_From_Query_String()
{
var response = await Client.PostAsync("/api/client-proxy-test/by-query-type?Name=test&Value=42", null);
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe("test:42");
}
[Fact]
public async Task Should_Read_Remote_Stream_Content_From_Form()
{
using var content = new MultipartFormDataContent();
content.Add(new StringContent("file content"), "file", "test.txt");
var response = await Client.PostAsync("/api/client-proxy-test/upload", content);
response.StatusCode.ShouldBe(HttpStatusCode.OK);
(await response.Content.ReadAsStringAsync()).ShouldBe("test.txt:file content");
}
[Fact]
public async Task Should_Use_Url_And_Http_Method_Of_Remote_Action()
{
var action = GetProxyAction<ClientProxyTestAppServiceClientProxy>(nameof(IClientProxyTestAppService.GetFromBodyAsync));
action.AttributeRouteInfo.ShouldNotBeNull();
action.AttributeRouteInfo.Template.ShouldBe("api/client-proxy-test/from-body");
action.ActionConstraints.ShouldNotBeNull();
action.ActionConstraints.OfType<HttpMethodActionConstraint>().Single().HttpMethods.ShouldBe(new[] { "POST" });
var response = await Client.GetAsync("/api/client-proxy-test/from-body");
response.StatusCode.ShouldBe(HttpStatusCode.MethodNotAllowed);
}
[Fact]
public void Should_Use_Controller_Group_Name_As_Controller_Name()
{
var action = GetProxyAction<ClientProxyTestAppServiceClientProxy>(nameof(IClientProxyTestAppService.GetFromBodyAsync));
action.ControllerName.ShouldBe("ClientProxyTest");
}
[Fact]
public async Task Should_Remove_ClientProxy_Postfix_From_Controller_Name_Without_Controller_Group_Name()
{
var action = GetProxyAction<ClientProxyNoGroupNameAppServiceClientProxy>(nameof(IClientProxyNoGroupNameAppService.GetAsync));
action.ControllerName.ShouldBe("ClientProxyNoGroupNameAppService");
(await Client.GetStringAsync("/api/client-proxy-no-group-name")).ShouldBe("no-group-name");
}
[Fact]
public void Should_Use_Root_Path_As_Area()
{
var action = GetProxyAction<ClientProxyTestAppServiceClientProxy>(nameof(IClientProxyTestAppService.GetFromBodyAsync));
action.RouteValues["area"].ShouldBe("clientProxyTest");
}
[Theory]
[InlineData(nameof(IClientProxyTestAppService.GetNotDescribedAsync))]
[InlineData(nameof(IClientProxyTestAppService.GetNotDescribedWithRemoteServiceAsync))]
[InlineData(nameof(IClientProxyTestAppService.GetNotDescribedWithVerbAsync))]
[InlineData(nameof(IClientProxyTestAppService.GetNotDescribedHiddenAsync))]
[InlineData(nameof(IClientProxyTestAppService.GetNotDescribedIgnoredAsync))]
[InlineData(nameof(IClientProxyTestAppService.GetDisabledAsync))]
[InlineData(nameof(IClientProxyTestAppService.GetDisabledWithVerbAsync))]
public async Task Should_Not_Expose_Action_Without_Route(string methodName)
{
FindProxyAction<ClientProxyTestAppServiceClientProxy>(methodName).ShouldBeNull();
var response = await Client.GetAsync($"/clientProxyTest/ClientProxyTest/{methodName.RemovePostFix("Async")}");
response.StatusCode.ShouldBe(HttpStatusCode.NotFound);
}
[Fact]
public async Task Should_Not_Expose_Action_Without_Route_When_Controller_Has_No_Other_Route()
{
FindProxyAction<ClientProxyDisabledActionAppServiceClientProxy>(nameof(IClientProxyDisabledActionAppService.GetAsync)).ShouldBeNull();
(await Client.GetAsync("/clientProxyTest/ClientProxyDisabledAction/Get")).StatusCode.ShouldBe(HttpStatusCode.NotFound);
(await Client.GetAsync("/api/client-proxy-disabled-action")).StatusCode.ShouldBe(HttpStatusCode.NotFound);
}
[Fact]
public async Task Should_Not_Expose_Actions_Of_Disabled_Client_Proxy_Without_Explicit_Route()
{
FindProxyAction<ClientProxyDisabledAppServiceClientProxy>(nameof(IClientProxyDisabledAppService.GetAsync)).ShouldBeNull();
(await Client.GetAsync("/clientProxyTest/ClientProxyDisabled/Get")).StatusCode.ShouldBe(HttpStatusCode.NotFound);
(await Client.GetAsync("/api/client-proxy-disabled")).StatusCode.ShouldBe(HttpStatusCode.NotFound);
(await Client.GetStringAsync("/api/client-proxy-disabled/with-route")).ShouldBe("disabled-with-route");
}
[Theory]
[InlineData(nameof(IClientProxyTestAppService.GetDisabledWithRouteAsync), "api/client-proxy-test/disabled-with-route", false)]
[InlineData(nameof(IClientProxyTestAppService.GetNotDescribedWithRouteAsync), "api/client-proxy-test/not-described-with-route", true)]
public async Task Should_Keep_Explicit_Action_Route(string methodName, string url, bool visibleInApiExplorer)
{
GetProxyAction<ClientProxyTestAppServiceClientProxy>(methodName).AttributeRouteInfo.Template.ShouldBe(url);
(await Client.GetAsync($"/{url}")).StatusCode.ShouldBe(HttpStatusCode.OK);
GetApiDescriptions("ClientProxyTest").Any(x => x.RelativePath == url).ShouldBe(visibleInApiExplorer);
}
[Fact]
public async Task Should_Keep_Only_Explicit_Route_Of_Action_With_Multiple_Selectors()
{
var action = GetProxyAction<ClientProxyTestAppServiceClientProxy>(nameof(IClientProxyTestAppService.GetDisabledWithVerbAndRouteAsync));
action.AttributeRouteInfo.Template.ShouldBe("api/client-proxy-test/disabled-with-verb-and-route");
(await Client.PostAsync("/api/client-proxy-test/disabled-with-verb-and-route", null)).StatusCode.ShouldBe(HttpStatusCode.OK);
(await Client.GetAsync("/clientProxyTest/ClientProxyTest/GetDisabledWithVerbAndRoute")).StatusCode.ShouldBe(HttpStatusCode.NotFound);
}
[Fact]
public async Task Should_Keep_Explicit_Controller_Route()
{
(await Client.GetStringAsync("/api/client-proxy-controller-route")).ShouldBe("controller-route");
(await Client.GetAsync("/api/client-proxy-controller-route-json")).StatusCode.ShouldBe(HttpStatusCode.NotFound);
}
[Fact]
public async Task Should_Hide_Client_Proxy_With_Disabled_Metadata_From_Api_Explorer()
{
(await Client.GetStringAsync("/api/client-proxy-metadata-disabled")).ShouldBe("metadata-disabled");
GetApiDescriptions("ClientProxyMetadataDisabled").ShouldBeEmpty();
}
[Fact]
public async Task Should_Remove_Client_Proxy_Controller_If_Another_Controller_Implements_The_Same_Service()
{
GetActions()
.Any(x => x.ControllerTypeInfo.AsType() == typeof(ClientProxyDuplicatedAppServiceClientProxy))
.ShouldBeFalse();
(await Client.GetStringAsync("/api/client-proxy-duplicated")).ShouldBe("controller");
(await Client.GetAsync("/api/client-proxy-duplicated-proxy")).StatusCode.ShouldBe(HttpStatusCode.NotFound);
}
[Fact]
public void Should_Add_Client_Proxy_Actions_To_Api_Explorer()
{
var apiDescriptions = GetApiDescriptions("ClientProxyTest");
apiDescriptions.ShouldContain(x => x.RelativePath == "api/client-proxy-test/from-body" && x.HttpMethod == "POST");
apiDescriptions.ShouldContain(x => x.RelativePath == "api/client-proxy-test/{id}" && x.HttpMethod == "PUT");
}
[Fact]
public async Task Should_Hide_Action_With_Disabled_Metadata_From_Api_Explorer()
{
GetApiDescriptions("ClientProxyTest").ShouldNotContain(x => x.RelativePath == "api/client-proxy-test/hidden");
(await Client.GetStringAsync("/api/client-proxy-test/hidden")).ShouldBe("hidden");
}
private ControllerActionDescriptor[] GetActions()
{
return GetRequiredService<IActionDescriptorCollectionProvider>()
.ActionDescriptors.Items
.OfType<ControllerActionDescriptor>()
.ToArray();
}
private ControllerActionDescriptor GetProxyAction<TClientProxy>(string methodName)
{
return GetActions().Single(x => x.ControllerTypeInfo.AsType() == typeof(TClientProxy) && x.MethodInfo.Name == methodName);
}
private ControllerActionDescriptor FindProxyAction<TClientProxy>(string methodName)
{
return GetActions().SingleOrDefault(x => x.ControllerTypeInfo.AsType() == typeof(TClientProxy) && x.MethodInfo.Name == methodName);
}
private ApiDescription[] GetApiDescriptions(string groupName)
{
return GetRequiredService<IApiDescriptionGroupCollectionProvider>()
.ApiDescriptionGroups.Items
.Where(x => x.GroupName == groupName)
.SelectMany(x => x.Items)
.ToArray();
}
}
public interface IClientProxyTestAppService : IApplicationService
{
Task<string> GetFromBodyAsync(string value);
Task<string> GetFromQueryAsync(string value);
Task<int> GetNumberFromBodyAsync(int value);
Task<string> GetFromExplicitQueryAsync(string value);
Task<string> GetQueryParametersAsync(int number, bool flag, Guid guid);
Task<string> CreateAsync(ClientProxyTestInput input);
Task<string> UpdateAsync(Guid id, ClientProxyTestInput input);
Task<string> GetListAsync(ClientProxyTestInput input);
Task<string> GetByQueryTypeAsync(ClientProxyTestQueryInput input);
Task<string> UploadAsync(IRemoteStreamContent file);
Task<string> GetHiddenAsync();
Task<string> GetNotDescribedAsync();
Task<string> GetDisabledAsync();
Task<string> GetDisabledWithVerbAsync();
Task<string> GetNotDescribedWithRemoteServiceAsync();
Task<string> GetNotDescribedWithVerbAsync();
Task<string> GetNotDescribedHiddenAsync();
Task<string> GetNotDescribedIgnoredAsync();
Task<string> GetDisabledWithRouteAsync();
Task<string> GetNotDescribedWithRouteAsync();
Task<string> GetDisabledWithVerbAndRouteAsync();
}
// Returns the received values instead of calling a remote service, so the tests can see what the proxy controller bound.
public class ClientProxyTestAppServiceClientProxy : ClientProxyBase<IClientProxyTestAppService>, IClientProxyTestAppService
{
public virtual Task<string> GetFromBodyAsync(string value)
{
return Task.FromResult(value);
}
public virtual Task<string> GetFromQueryAsync(string value)
{
return Task.FromResult(value);
}
public virtual Task<int> GetNumberFromBodyAsync(int value)
{
return Task.FromResult(value);
}
public virtual Task<string> GetFromExplicitQueryAsync([FromQuery] string value)
{
return Task.FromResult(value);
}
public virtual Task<string> GetQueryParametersAsync(int number, bool flag, Guid guid)
{
return Task.FromResult($"{number}:{flag}:{guid}");
}
public virtual Task<string> CreateAsync(ClientProxyTestInput input)
{
return Task.FromResult($"{input.Name}:{input.Value}");
}
public virtual Task<string> UpdateAsync(Guid id, ClientProxyTestInput input)
{
return Task.FromResult($"{id}:{input.Name}:{input.Value}");
}
public virtual Task<string> GetListAsync(ClientProxyTestInput input)
{
return Task.FromResult($"{input.Name}:{input.Value}");
}
public virtual Task<string> GetByQueryTypeAsync(ClientProxyTestQueryInput input)
{
return Task.FromResult($"{input.Name}:{input.Value}");
}
public virtual async Task<string> UploadAsync(IRemoteStreamContent file)
{
using var reader = new StreamReader(file.GetStream());
return $"{file.FileName}:{await reader.ReadToEndAsync()}";
}
[RemoteService(IsMetadataEnabled = false)]
public virtual Task<string> GetHiddenAsync()
{
return Task.FromResult("hidden");
}
public virtual Task<string> GetNotDescribedAsync()
{
return Task.FromResult("not-described");
}
[RemoteService(false)]
public virtual Task<string> GetDisabledAsync()
{
return Task.FromResult("disabled");
}
[RemoteService(false)]
[HttpGet]
public virtual Task<string> GetDisabledWithVerbAsync()
{
return Task.FromResult("disabled-with-verb");
}
[RemoteService]
public virtual Task<string> GetNotDescribedWithRemoteServiceAsync()
{
return Task.FromResult("not-described-with-remote-service");
}
[HttpGet]
public virtual Task<string> GetNotDescribedWithVerbAsync()
{
return Task.FromResult("not-described-with-verb");
}
[RemoteService(IsMetadataEnabled = false)]
public virtual Task<string> GetNotDescribedHiddenAsync()
{
return Task.FromResult("not-described-hidden");
}
[ApiExplorerSettings(IgnoreApi = true)]
public virtual Task<string> GetNotDescribedIgnoredAsync()
{
return Task.FromResult("not-described-ignored");
}
[RemoteService(false)]
[HttpGet("api/client-proxy-test/disabled-with-route")]
public virtual Task<string> GetDisabledWithRouteAsync()
{
return Task.FromResult("disabled-with-route");
}
[HttpGet("api/client-proxy-test/not-described-with-route")]
public virtual Task<string> GetNotDescribedWithRouteAsync()
{
return Task.FromResult("not-described-with-route");
}
[RemoteService(false)]
[HttpGet]
[HttpPost("api/client-proxy-test/disabled-with-verb-and-route")]
public virtual Task<string> GetDisabledWithVerbAndRouteAsync()
{
return Task.FromResult("disabled-with-verb-and-route");
}
}
public class ClientProxyTestInput
{
public string Name { get; set; }
public int Value { get; set; }
}
public class ClientProxyTestQueryInput
{
public string Name { get; set; }
public int Value { get; set; }
}
public interface IClientProxyNoGroupNameAppService : IApplicationService
{
Task<string> GetAsync();
}
public class ClientProxyNoGroupNameAppServiceClientProxy : ClientProxyBase<IClientProxyNoGroupNameAppService>, IClientProxyNoGroupNameAppService
{
public virtual Task<string> GetAsync()
{
return Task.FromResult("no-group-name");
}
}
public interface IClientProxyDuplicatedAppService : IApplicationService
{
Task<string> GetAsync();
}
public class ClientProxyDuplicatedAppServiceClientProxy : ClientProxyBase<IClientProxyDuplicatedAppService>, IClientProxyDuplicatedAppService
{
public virtual Task<string> GetAsync()
{
return Task.FromResult("proxy");
}
}
[Route("api/client-proxy-duplicated")]
public class ClientProxyDuplicatedController : AbpControllerBase, IClientProxyDuplicatedAppService
{
[HttpGet]
public virtual Task<string> GetAsync()
{
return Task.FromResult("controller");
}
}
public interface IClientProxyDisabledAppService : IApplicationService
{
Task<string> GetAsync();
Task<string> GetWithRouteAsync();
}
[RemoteService(false)]
public class ClientProxyDisabledAppServiceClientProxy : ClientProxyBase<IClientProxyDisabledAppService>, IClientProxyDisabledAppService
{
public virtual Task<string> GetAsync()
{
return Task.FromResult("disabled");
}
[HttpGet("api/client-proxy-disabled/with-route")]
public virtual Task<string> GetWithRouteAsync()
{
return Task.FromResult("disabled-with-route");
}
}
public interface IClientProxyDisabledActionAppService : IApplicationService
{
Task<string> GetAsync();
}
public class ClientProxyDisabledActionAppServiceClientProxy : ClientProxyBase<IClientProxyDisabledActionAppService>, IClientProxyDisabledActionAppService
{
[RemoteService(false)]
public virtual Task<string> GetAsync()
{
return Task.FromResult("disabled-action");
}
}
public interface IClientProxyMetadataDisabledAppService : IApplicationService
{
Task<string> GetAsync();
}
[RemoteService(IsMetadataEnabled = false)]
public class ClientProxyMetadataDisabledAppServiceClientProxy : ClientProxyBase<IClientProxyMetadataDisabledAppService>, IClientProxyMetadataDisabledAppService
{
public virtual Task<string> GetAsync()
{
return Task.FromResult("metadata-disabled");
}
}
public interface IClientProxyControllerRouteAppService : IApplicationService
{
Task<string> GetAsync();
}
[Route("api/client-proxy-controller-route")]
public class ClientProxyControllerRouteAppServiceClientProxy : ClientProxyBase<IClientProxyControllerRouteAppService>, IClientProxyControllerRouteAppService
{
[RemoteService(false)]
[HttpGet]
public virtual Task<string> GetAsync()
{
return Task.FromResult("controller-route");
}
}

719
framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Conventions/client-proxy-test-generate-proxy.json

@ -0,0 +1,719 @@
{
"modules": {
"clientProxyTest": {
"rootPath": "clientProxyTest",
"remoteServiceName": "Default",
"controllers": {
"Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestController": {
"controllerName": "ClientProxyTest",
"controllerGroupName": "ClientProxyTest",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestController",
"interfaces": [
{
"type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService",
"name": "IClientProxyTestAppService",
"methods": []
}
],
"actions": {
"GetFromBodyAsyncByValue": {
"uniqueName": "GetFromBodyAsyncByValue",
"name": "GetFromBodyAsync",
"httpMethod": "POST",
"url": "api/client-proxy-test/from-body",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "value",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "value",
"name": "value",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"GetFromQueryAsyncByValue": {
"uniqueName": "GetFromQueryAsyncByValue",
"name": "GetFromQueryAsync",
"httpMethod": "POST",
"url": "api/client-proxy-test/from-query",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "value",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "value",
"name": "value",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"GetNumberFromBodyAsyncByValue": {
"uniqueName": "GetNumberFromBodyAsyncByValue",
"name": "GetNumberFromBodyAsync",
"httpMethod": "POST",
"url": "api/client-proxy-test/number-from-body",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "value",
"typeAsString": "System.Int32, System.Private.CoreLib",
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "value",
"name": "value",
"jsonName": null,
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"GetFromExplicitQueryAsyncByValue": {
"uniqueName": "GetFromExplicitQueryAsyncByValue",
"name": "GetFromExplicitQueryAsync",
"httpMethod": "POST",
"url": "api/client-proxy-test/from-explicit-query",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "value",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "value",
"name": "value",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"GetQueryParametersAsyncByNumberAndFlagAndGuid": {
"uniqueName": "GetQueryParametersAsyncByNumberAndFlagAndGuid",
"name": "GetQueryParametersAsync",
"httpMethod": "GET",
"url": "api/client-proxy-test/query-parameters",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "number",
"typeAsString": "System.Int32, System.Private.CoreLib",
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null
},
{
"name": "flag",
"typeAsString": "System.Boolean, System.Private.CoreLib",
"type": "System.Boolean",
"typeSimple": "boolean",
"isOptional": false,
"defaultValue": null
},
{
"name": "guid",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "number",
"name": "number",
"jsonName": null,
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
},
{
"nameOnMethod": "flag",
"name": "flag",
"jsonName": null,
"type": "System.Boolean",
"typeSimple": "boolean",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
},
{
"nameOnMethod": "guid",
"name": "guid",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"CreateAsyncByInput": {
"uniqueName": "CreateAsyncByInput",
"name": "CreateAsync",
"httpMethod": "POST",
"url": "api/client-proxy-test",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput, Volo.Abp.Http.Client.Web.Tests",
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"UpdateAsyncByIdAndInput": {
"uniqueName": "UpdateAsyncByIdAndInput",
"name": "UpdateAsync",
"httpMethod": "PUT",
"url": "api/client-proxy-test/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput, Volo.Abp.Http.Client.Web.Tests",
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Path",
"descriptorName": ""
},
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"GetListAsyncByInput": {
"uniqueName": "GetListAsyncByInput",
"name": "GetListAsync",
"httpMethod": "GET",
"url": "api/client-proxy-test",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput, Volo.Abp.Http.Client.Web.Tests",
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestInput",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "Name",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": "input"
},
{
"nameOnMethod": "input",
"name": "Value",
"jsonName": null,
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": "input"
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"GetByQueryTypeAsyncByInput": {
"uniqueName": "GetByQueryTypeAsyncByInput",
"name": "GetByQueryTypeAsync",
"httpMethod": "POST",
"url": "api/client-proxy-test/by-query-type",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestQueryInput, Volo.Abp.Http.Client.Web.Tests",
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestQueryInput",
"typeSimple": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyTestQueryInput",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "Name",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Query",
"descriptorName": "input"
},
{
"nameOnMethod": "input",
"name": "Value",
"jsonName": null,
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Query",
"descriptorName": "input"
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"UploadAsyncByFile": {
"uniqueName": "UploadAsyncByFile",
"name": "UploadAsync",
"httpMethod": "POST",
"url": "api/client-proxy-test/upload",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "file",
"typeAsString": "Volo.Abp.Content.IRemoteStreamContent, Volo.Abp.Core",
"type": "Volo.Abp.Content.IRemoteStreamContent",
"typeSimple": "Volo.Abp.Content.IRemoteStreamContent",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "file",
"name": "file",
"jsonName": null,
"type": "Volo.Abp.Content.IRemoteStreamContent",
"typeSimple": "Volo.Abp.Content.IRemoteStreamContent",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "FormFile",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"GetHiddenAsync": {
"uniqueName": "GetHiddenAsync",
"name": "GetHiddenAsync",
"httpMethod": "GET",
"url": "api/client-proxy-test/hidden",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"GetDisabledAsync": {
"uniqueName": "GetDisabledAsync",
"name": "GetDisabledAsync",
"httpMethod": "GET",
"url": "api/client-proxy-test/disabled",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
},
"GetDisabledWithVerbAsync": {
"uniqueName": "GetDisabledWithVerbAsync",
"name": "GetDisabledWithVerbAsync",
"httpMethod": "GET",
"url": "api/client-proxy-test/disabled-with-verb",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyTestAppService"
}
}
},
"Volo.Abp.Http.Client.Web.Conventions.ClientProxyNoGroupNameController": {
"controllerName": "ClientProxyNoGroupName",
"controllerGroupName": "",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyNoGroupNameController",
"interfaces": [
{
"type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyNoGroupNameAppService",
"name": "IClientProxyNoGroupNameAppService",
"methods": []
}
],
"actions": {
"GetAsync": {
"uniqueName": "GetAsync",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/client-proxy-no-group-name",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyNoGroupNameAppService"
}
}
},
"Volo.Abp.Http.Client.Web.Conventions.ClientProxyDuplicatedController": {
"controllerName": "ClientProxyDuplicated",
"controllerGroupName": "ClientProxyDuplicated",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyDuplicatedController",
"interfaces": [
{
"type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDuplicatedAppService",
"name": "IClientProxyDuplicatedAppService",
"methods": []
}
],
"actions": {
"GetAsync": {
"uniqueName": "GetAsync",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/client-proxy-duplicated-proxy",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDuplicatedAppService"
}
}
},
"Volo.Abp.Http.Client.Web.Conventions.ClientProxyDisabledController": {
"controllerName": "ClientProxyDisabled",
"controllerGroupName": "ClientProxyDisabled",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyDisabledController",
"interfaces": [
{
"type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDisabledAppService",
"name": "IClientProxyDisabledAppService",
"methods": []
}
],
"actions": {
"GetAsync": {
"uniqueName": "GetAsync",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/client-proxy-disabled",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDisabledAppService"
}
}
},
"Volo.Abp.Http.Client.Web.Conventions.ClientProxyDisabledActionController": {
"controllerName": "ClientProxyDisabledAction",
"controllerGroupName": "ClientProxyDisabledAction",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyDisabledActionController",
"interfaces": [
{
"type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDisabledActionAppService",
"name": "IClientProxyDisabledActionAppService",
"methods": []
}
],
"actions": {
"GetAsync": {
"uniqueName": "GetAsync",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/client-proxy-disabled-action",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyDisabledActionAppService"
}
}
},
"Volo.Abp.Http.Client.Web.Conventions.ClientProxyMetadataDisabledController": {
"controllerName": "ClientProxyMetadataDisabled",
"controllerGroupName": "ClientProxyMetadataDisabled",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyMetadataDisabledController",
"interfaces": [
{
"type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyMetadataDisabledAppService",
"name": "IClientProxyMetadataDisabledAppService",
"methods": []
}
],
"actions": {
"GetAsync": {
"uniqueName": "GetAsync",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/client-proxy-metadata-disabled",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyMetadataDisabledAppService"
}
}
},
"Volo.Abp.Http.Client.Web.Conventions.ClientProxyControllerRouteController": {
"controllerName": "ClientProxyControllerRoute",
"controllerGroupName": "ClientProxyControllerRoute",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.Abp.Http.Client.Web.Conventions.ClientProxyControllerRouteController",
"interfaces": [
{
"type": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyControllerRouteAppService",
"name": "IClientProxyControllerRouteAppService",
"methods": []
}
],
"actions": {
"GetAsync": {
"uniqueName": "GetAsync",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/client-proxy-controller-route-json",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.String",
"typeSimple": "string"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Http.Client.Web.Conventions.IClientProxyControllerRouteAppService"
}
}
}
}
}
},
"types": {}
}

10
framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/Program.cs

@ -0,0 +1,10 @@
using Microsoft.AspNetCore.Builder;
using Volo.Abp.AspNetCore.TestBase;
using Volo.Abp.Http.Client.Web;
var builder = WebApplication.CreateBuilder();
await builder.RunAbpModuleAsync<AbpHttpClientWebTestModule>();
public partial class Program
{
}
Loading…
Cancel
Save