Ends in:
2 DAYS
4 HRS
8 MIN
54 SEC
Ends in:
2 D
4 H
8 M
54 S
Open Closed

BUG in Swagger, ChildDataGrid endpoint doesn't follow api route convention #7485


User avatar
0
rafael.gonzales created
  • ABP Framework version: v8.2.0
  • UI Type: MVC
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Steps to reproduce the issue:
  • Create an entity using ABP Suite
  • Create a child entity from the previous one.
  • Browse the /swagger page in your solution

The main entity generated gets a "ChildDataGrid" endpoint that is not customized with the "/api/app" default prefix and can't be customized with an override "ConventionalRouteBuilder" class.


2 Answer(s)
  • User Avatar
    0
    rafael.gonzales created

    Found the issue,

    the generated Controller from ABP Suite only adds a basic route like the following

    [Route("[controller]/[action]")]
    public class ClientsController : AbpController
    {
        [HttpGet]
        public virtual async Task<PartialViewResult> ChildDataGrid(Guid clientId)
        {
            return PartialView("~/Pages/Shared/Clients/_ChildDataGrids.cshtml", clienteId);
        }
    }
    

    It makes the AbpServiceConvention class to ignore this part of the code

    If the ConfigureRemoteService method is not initiated, there won't be any URL modification in the route's prefix.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks. I have refunded your ticket. 👍

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35