Browse Source

updated cmskit proxy

pull/248/head
Galip Tolga Erdem 2 years ago
parent
commit
7d168f23d1
  1. 2
      aspire/AppHost/Program.cs
  2. 28
      services/cmskit/src/EShopOnAbp.CmskitService.Application/Samples/SampleAppService.cs
  3. 8
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.Generated.cs
  4. 2
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.cs
  5. 9
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.Generated.cs
  6. 2
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.cs
  7. 199
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json
  8. 34
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/Samples/SampleController.cs

2
aspire/AppHost/Program.cs

@ -6,7 +6,7 @@ var administrationService =
var identityService = builder.AddProject<Projects.EShopOnAbp_IdentityService_HttpApi_Host>("identityService");
var catalogService = builder.AddProject<Projects.EShopOnAbp_CatalogService_HttpApi_Host>("catalogService");
var basketService = builder.AddProject<Projects.EShopOnAbp_BasketService>("basketService")
.WithReference(catalogService);
.WithReference(catalogService); //?
var cmsKitService = builder.AddProject<Projects.EShopOnAbp_CmskitService_HttpApi_Host>("cmsKitService");
var orderingService = builder.AddProject<Projects.EShopOnAbp_OrderingService_HttpApi_Host>("orderingService");
var paymentService = builder.AddProject<Projects.EShopOnAbp_PaymentService_HttpApi_Host>("paymentService");

28
services/cmskit/src/EShopOnAbp.CmskitService.Application/Samples/SampleAppService.cs

@ -1,28 +0,0 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
namespace EShopOnAbp.CmskitService.Samples;
public class SampleAppService : CmskitServiceAppService, ISampleAppService
{
public Task<SampleDto> GetAsync()
{
return Task.FromResult(
new SampleDto
{
Value = 42
}
);
}
[Authorize]
public Task<SampleDto> GetAuthorizedAsync()
{
return Task.FromResult(
new SampleDto
{
Value = 42
}
);
}
}

8
services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs → services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.Generated.cs

@ -1,15 +1,17 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Comments;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Comments.ClientProxies;
namespace Volo.CmsKit.Public.Comments;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ICommentPublicAppService), typeof(CommentPublicClientProxy))]

2
services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs → services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of CommentPublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Comments.ClientProxies;
namespace Volo.CmsKit.Public.Comments;
public partial class CommentPublicClientProxy
{

9
services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs → services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.Generated.cs

@ -1,16 +1,17 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Ratings;
using System.Collections.Generic;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Ratings.ClientProxies;
namespace Volo.CmsKit.Public.Ratings;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IRatingPublicAppService), typeof(RatingPublicClientProxy))]

2
services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs → services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of RatingPublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Ratings.ClientProxies;
namespace Volo.CmsKit.Public.Ratings;
public partial class RatingPublicClientProxy
{

199
services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json

@ -7,12 +7,99 @@
"Volo.CmsKit.Public.Ratings.RatingPublicController": {
"controllerName": "RatingPublic",
"controllerGroupName": "RatingPublic",
"isRemoteService": false,
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.Ratings.RatingPublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService"
"type": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService",
"name": "IRatingPublicAppService",
"methods": [
{
"name": "CreateAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput, Volo.CmsKit.Public.Application.Contracts",
"type": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput",
"typeSimple": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.CmsKit.Public.Ratings.RatingDto",
"typeSimple": "Volo.CmsKit.Public.Ratings.RatingDto"
}
},
{
"name": "DeleteAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
}
},
{
"name": "GetGroupedStarCountsAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Collections.Generic.List<Volo.CmsKit.Public.Ratings.RatingWithStarCountDto>",
"typeSimple": "[Volo.CmsKit.Public.Ratings.RatingWithStarCountDto]"
}
}
]
}
],
"actions": {
@ -212,12 +299,116 @@
"Volo.CmsKit.Public.Comments.CommentPublicController": {
"controllerName": "CommentPublic",
"controllerGroupName": "CommentPublic",
"isRemoteService": false,
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.Comments.CommentPublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Public.Comments.ICommentPublicAppService"
"type": "Volo.CmsKit.Public.Comments.ICommentPublicAppService",
"name": "ICommentPublicAppService",
"methods": [
{
"name": "GetListAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<Volo.CmsKit.Public.Comments.CommentWithDetailsDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<Volo.CmsKit.Public.Comments.CommentWithDetailsDto>"
}
},
{
"name": "CreateAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.CmsKit.Public.Comments.CreateCommentInput, Volo.CmsKit.Public.Application.Contracts",
"type": "Volo.CmsKit.Public.Comments.CreateCommentInput",
"typeSimple": "Volo.CmsKit.Public.Comments.CreateCommentInput",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.CmsKit.Public.Comments.CommentDto",
"typeSimple": "Volo.CmsKit.Public.Comments.CommentDto"
}
},
{
"name": "UpdateAsync",
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.CmsKit.Public.Comments.UpdateCommentInput, Volo.CmsKit.Public.Application.Contracts",
"type": "Volo.CmsKit.Public.Comments.UpdateCommentInput",
"typeSimple": "Volo.CmsKit.Public.Comments.UpdateCommentInput",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.CmsKit.Public.Comments.CommentDto",
"typeSimple": "Volo.CmsKit.Public.Comments.CommentDto"
}
},
{
"name": "DeleteAsync",
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
}
}
]
}
],
"actions": {

34
services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/Samples/SampleController.cs

@ -1,34 +0,0 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
namespace EShopOnAbp.CmskitService.Samples;
[RemoteService(Name = CmskitServiceRemoteServiceConsts.RemoteServiceName)]
[Area("CmskitService")]
[ControllerName("CmskitService")]
[Route("api/CmskitService/sample")]
public class SampleController : CmskitServiceController, ISampleAppService
{
private readonly ISampleAppService _sampleAppService;
public SampleController(ISampleAppService sampleAppService)
{
_sampleAppService = sampleAppService;
}
[HttpGet]
public async Task<SampleDto> GetAsync()
{
return await _sampleAppService.GetAsync();
}
[HttpGet]
[Route("authorized")]
[Authorize]
public async Task<SampleDto> GetAuthorizedAsync()
{
return await _sampleAppService.GetAsync();
}
}
Loading…
Cancel
Save