From 77065047e754f82a9dfa0c9b954e2cfc7243f648 Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 21 Oct 2026 12:58:11 +0800 Subject: [PATCH] Add tests for AbpHttpClientProxyServiceConvention --- ...pHttpClientProxyServiceConvention_Tests.cs | 189 ++++++++ .../Client/Web/AbpHttpClientWebTestModule.cs | 6 + ...entProxyDuplicatedAppServiceClientProxy.cs | 12 + .../Web/ClientProxyDuplicatedController.cs | 15 + ...ntProxyNoGroupNameAppServiceClientProxy.cs | 12 + .../ClientProxyTestAppServiceClientProxy.cs | 58 ++- .../Http/Client/Web/ClientProxyTestInput.cs | 8 + .../Client/Web/ClientProxyTestQueryInput.cs | 8 + .../Web/IClientProxyDuplicatedAppService.cs | 9 + .../Web/IClientProxyNoGroupNameAppService.cs | 9 + .../Client/Web/IClientProxyTestAppService.cs | 22 + .../Web/client-proxy-test-generate-proxy.json | 459 ++++++++++++++++++ 12 files changed, 806 insertions(+), 1 deletion(-) create mode 100644 framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedAppServiceClientProxy.cs create mode 100644 framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedController.cs create mode 100644 framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyNoGroupNameAppServiceClientProxy.cs create mode 100644 framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestInput.cs create mode 100644 framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestQueryInput.cs create mode 100644 framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyDuplicatedAppService.cs create mode 100644 framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyNoGroupNameAppService.cs diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientProxyServiceConvention_Tests.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientProxyServiceConvention_Tests.cs index d4f147f28f..d76efe0954 100644 --- a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientProxyServiceConvention_Tests.cs +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientProxyServiceConvention_Tests.cs @@ -1,7 +1,13 @@ +using System; +using System.Linq; using System.Net; using System.Net.Http; using System.Text; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.ActionConstraints; +using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Shouldly; using Xunit; @@ -20,6 +26,17 @@ public class AbpHttpClientProxyServiceConvention_Tests : AbpHttpClientWebTestBas (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() { @@ -28,4 +45,176 @@ public class AbpHttpClientProxyServiceConvention_Tests : AbpHttpClientWebTestBas 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(nameof(IClientProxyTestAppService.GetFromBodyAsync)); + + action.AttributeRouteInfo.ShouldNotBeNull(); + action.AttributeRouteInfo.Template.ShouldBe("api/client-proxy-test/from-body"); + action.ActionConstraints.ShouldNotBeNull(); + action.ActionConstraints.OfType().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(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(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(nameof(IClientProxyTestAppService.GetFromBodyAsync)); + + action.RouteValues["area"].ShouldBe("clientProxyTest"); + } + + [Fact] + public void Should_Not_Expose_Action_Not_In_Api_Description() + { + GetActions() + .Any(x => x.ControllerTypeInfo.AsType() == typeof(ClientProxyTestAppServiceClientProxy) && + x.MethodInfo.Name == nameof(IClientProxyTestAppService.GetNotDescribedAsync)) + .ShouldBeFalse(); + } + + [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() + .ActionDescriptors.Items + .OfType() + .ToArray(); + } + + private ControllerActionDescriptor GetProxyAction(string methodName) + { + return GetActions().Single(x => x.ControllerTypeInfo.AsType() == typeof(TClientProxy) && x.MethodInfo.Name == methodName); + } + + private ApiDescription[] GetApiDescriptions(string groupName) + { + return GetRequiredService() + .ApiDescriptionGroups.Items + .Where(x => x.GroupName == groupName) + .SelectMany(x => x.Items) + .ToArray(); + } } diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs index 5ade2901ab..a146fb735d 100644 --- a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs @@ -2,6 +2,7 @@ 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.Modularity; using Volo.Abp.VirtualFileSystem; @@ -18,6 +19,11 @@ public class AbpHttpClientWebTestModule : AbpModule { context.Services.AddStaticHttpClientProxies(typeof(AbpHttpClientWebTestModule).Assembly); + Configure(options => + { + options.BindingFromQueryTypes.Add(typeof(ClientProxyTestQueryInput)); + }); + Configure(options => { options.FileSets.AddEmbedded(); diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedAppServiceClientProxy.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedAppServiceClientProxy.cs new file mode 100644 index 0000000000..7d6040f47e --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedAppServiceClientProxy.cs @@ -0,0 +1,12 @@ +using System.Threading.Tasks; +using Volo.Abp.Http.Client.ClientProxying; + +namespace Volo.Abp.Http.Client.Web; + +public class ClientProxyDuplicatedAppServiceClientProxy : ClientProxyBase, IClientProxyDuplicatedAppService +{ + public virtual Task GetAsync() + { + return Task.FromResult("proxy"); + } +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedController.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedController.cs new file mode 100644 index 0000000000..c8c2a072ec --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedController.cs @@ -0,0 +1,15 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; + +namespace Volo.Abp.Http.Client.Web; + +[Route("api/client-proxy-duplicated")] +public class ClientProxyDuplicatedController : AbpControllerBase, IClientProxyDuplicatedAppService +{ + [HttpGet] + public virtual Task GetAsync() + { + return Task.FromResult("controller"); + } +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyNoGroupNameAppServiceClientProxy.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyNoGroupNameAppServiceClientProxy.cs new file mode 100644 index 0000000000..33f27ab60e --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyNoGroupNameAppServiceClientProxy.cs @@ -0,0 +1,12 @@ +using System.Threading.Tasks; +using Volo.Abp.Http.Client.ClientProxying; + +namespace Volo.Abp.Http.Client.Web; + +public class ClientProxyNoGroupNameAppServiceClientProxy : ClientProxyBase, IClientProxyNoGroupNameAppService +{ + public virtual Task GetAsync() + { + return Task.FromResult("no-group-name"); + } +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestAppServiceClientProxy.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestAppServiceClientProxy.cs index d91f9f1de1..c61ba139b8 100644 --- a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestAppServiceClientProxy.cs +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestAppServiceClientProxy.cs @@ -1,9 +1,13 @@ +using System; +using System.IO; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Content; using Volo.Abp.Http.Client.ClientProxying; namespace Volo.Abp.Http.Client.Web; -// Returns the received value instead of calling a remote service, so the tests can see what the proxy controller bound. +// 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 { public virtual Task GetFromBodyAsync(string value) @@ -15,4 +19,56 @@ public class ClientProxyTestAppServiceClientProxy : ClientProxyBase GetNumberFromBodyAsync(int value) + { + return Task.FromResult(value); + } + + public virtual Task GetFromExplicitQueryAsync([FromQuery] string value) + { + return Task.FromResult(value); + } + + public virtual Task GetQueryParametersAsync(int number, bool flag, Guid guid) + { + return Task.FromResult($"{number}:{flag}:{guid}"); + } + + public virtual Task CreateAsync(ClientProxyTestInput input) + { + return Task.FromResult($"{input.Name}:{input.Value}"); + } + + public virtual Task UpdateAsync(Guid id, ClientProxyTestInput input) + { + return Task.FromResult($"{id}:{input.Name}:{input.Value}"); + } + + public virtual Task GetListAsync(ClientProxyTestInput input) + { + return Task.FromResult($"{input.Name}:{input.Value}"); + } + + public virtual Task GetByQueryTypeAsync(ClientProxyTestQueryInput input) + { + return Task.FromResult($"{input.Name}:{input.Value}"); + } + + public virtual async Task UploadAsync(IRemoteStreamContent file) + { + using var reader = new StreamReader(file.GetStream()); + return $"{file.FileName}:{await reader.ReadToEndAsync()}"; + } + + [RemoteService(IsMetadataEnabled = false)] + public virtual Task GetHiddenAsync() + { + return Task.FromResult("hidden"); + } + + public virtual Task GetNotDescribedAsync() + { + return Task.FromResult("not-described"); + } } diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestInput.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestInput.cs new file mode 100644 index 0000000000..11f6fb5d11 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestInput.cs @@ -0,0 +1,8 @@ +namespace Volo.Abp.Http.Client.Web; + +public class ClientProxyTestInput +{ + public string Name { get; set; } + + public int Value { get; set; } +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestQueryInput.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestQueryInput.cs new file mode 100644 index 0000000000..89ac36b0d1 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestQueryInput.cs @@ -0,0 +1,8 @@ +namespace Volo.Abp.Http.Client.Web; + +public class ClientProxyTestQueryInput +{ + public string Name { get; set; } + + public int Value { get; set; } +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyDuplicatedAppService.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyDuplicatedAppService.cs new file mode 100644 index 0000000000..be920793e1 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyDuplicatedAppService.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Volo.Abp.Http.Client.Web; + +public interface IClientProxyDuplicatedAppService : IApplicationService +{ + Task GetAsync(); +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyNoGroupNameAppService.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyNoGroupNameAppService.cs new file mode 100644 index 0000000000..86093d2e58 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyNoGroupNameAppService.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Volo.Abp.Http.Client.Web; + +public interface IClientProxyNoGroupNameAppService : IApplicationService +{ + Task GetAsync(); +} diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyTestAppService.cs b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyTestAppService.cs index 03c9d5a3d3..8d8ec3f388 100644 --- a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyTestAppService.cs +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyTestAppService.cs @@ -1,5 +1,7 @@ +using System; using System.Threading.Tasks; using Volo.Abp.Application.Services; +using Volo.Abp.Content; namespace Volo.Abp.Http.Client.Web; @@ -8,4 +10,24 @@ public interface IClientProxyTestAppService : IApplicationService Task GetFromBodyAsync(string value); Task GetFromQueryAsync(string value); + + Task GetNumberFromBodyAsync(int value); + + Task GetFromExplicitQueryAsync(string value); + + Task GetQueryParametersAsync(int number, bool flag, Guid guid); + + Task CreateAsync(ClientProxyTestInput input); + + Task UpdateAsync(Guid id, ClientProxyTestInput input); + + Task GetListAsync(ClientProxyTestInput input); + + Task GetByQueryTypeAsync(ClientProxyTestQueryInput input); + + Task UploadAsync(IRemoteStreamContent file); + + Task GetHiddenAsync(); + + Task GetNotDescribedAsync(); } diff --git a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/client-proxy-test-generate-proxy.json b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/client-proxy-test-generate-proxy.json index 7b19bba494..0330fe5181 100644 --- a/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/client-proxy-test-generate-proxy.json +++ b/framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/client-proxy-test-generate-proxy.json @@ -92,6 +92,465 @@ }, "allowAnonymous": null, "implementFrom": "Volo.Abp.Http.Client.Web.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.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.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.IClientProxyTestAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/client-proxy-test", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Http.Client.Web.ClientProxyTestInput, Volo.Abp.Http.Client.Web.Tests", + "type": "Volo.Abp.Http.Client.Web.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.ClientProxyTestInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Http.Client.Web.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.ClientProxyTestInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.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.ClientProxyTestInput, Volo.Abp.Http.Client.Web.Tests", + "type": "Volo.Abp.Http.Client.Web.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.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.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.ClientProxyTestInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Http.Client.Web.IClientProxyTestAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/client-proxy-test", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Http.Client.Web.ClientProxyTestInput, Volo.Abp.Http.Client.Web.Tests", + "type": "Volo.Abp.Http.Client.Web.ClientProxyTestInput", + "typeSimple": "Volo.Abp.Http.Client.Web.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.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.ClientProxyTestQueryInput, Volo.Abp.Http.Client.Web.Tests", + "type": "Volo.Abp.Http.Client.Web.ClientProxyTestQueryInput", + "typeSimple": "Volo.Abp.Http.Client.Web.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.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.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.IClientProxyTestAppService" + } + } + }, + "Volo.Abp.Http.Client.Web.ClientProxyNoGroupNameController": { + "controllerName": "ClientProxyNoGroupName", + "controllerGroupName": "", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.Client.Web.ClientProxyNoGroupNameController", + "interfaces": [ + { + "type": "Volo.Abp.Http.Client.Web.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.IClientProxyNoGroupNameAppService" + } + } + }, + "Volo.Abp.Http.Client.Web.ClientProxyDuplicatedController": { + "controllerName": "ClientProxyDuplicated", + "controllerGroupName": "ClientProxyDuplicated", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Http.Client.Web.ClientProxyDuplicatedController", + "interfaces": [ + { + "type": "Volo.Abp.Http.Client.Web.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.IClientProxyDuplicatedAppService" } } }