Browse Source

Add tests for AbpHttpClientProxyServiceConvention

pull/26315/head
maliming 1 month ago
parent
commit
77065047e7
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 189
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientProxyServiceConvention_Tests.cs
  2. 6
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/AbpHttpClientWebTestModule.cs
  3. 12
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedAppServiceClientProxy.cs
  4. 15
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyDuplicatedController.cs
  5. 12
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyNoGroupNameAppServiceClientProxy.cs
  6. 58
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestAppServiceClientProxy.cs
  7. 8
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestInput.cs
  8. 8
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/ClientProxyTestQueryInput.cs
  9. 9
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyDuplicatedAppService.cs
  10. 9
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyNoGroupNameAppService.cs
  11. 22
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/IClientProxyTestAppService.cs
  12. 459
      framework/test/Volo.Abp.Http.Client.Web.Tests/Volo/Abp/Http/Client/Web/client-proxy-test-generate-proxy.json

189
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<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");
}
[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<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 ApiDescription[] GetApiDescriptions(string groupName)
{
return GetRequiredService<IApiDescriptionGroupCollectionProvider>()
.ApiDescriptionGroups.Items
.Where(x => x.GroupName == groupName)
.SelectMany(x => x.Items)
.ToArray();
}
}

6
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<AbpHttpClientStaticProxyingOptions>(options =>
{
options.BindingFromQueryTypes.Add(typeof(ClientProxyTestQueryInput));
});
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpHttpClientWebTestModule>();

12
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>, IClientProxyDuplicatedAppService
{
public virtual Task<string> GetAsync()
{
return Task.FromResult("proxy");
}
}

15
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<string> GetAsync()
{
return Task.FromResult("controller");
}
}

12
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>, IClientProxyNoGroupNameAppService
{
public virtual Task<string> GetAsync()
{
return Task.FromResult("no-group-name");
}
}

58
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>, IClientProxyTestAppService
{
public virtual Task<string> GetFromBodyAsync(string value)
@ -15,4 +19,56 @@ public class ClientProxyTestAppServiceClientProxy : ClientProxyBase<IClientProxy
{
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");
}
}

8
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; }
}

8
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; }
}

9
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<string> GetAsync();
}

9
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<string> GetAsync();
}

22
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<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();
}

459
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"
}
}
}

Loading…
Cancel
Save