Activities of "david1"

Hi, we're seeing the same issue as reported here for the latest version of ABP (stable and preview versions) and Angular 18: https://abp.io/support/questions/7489/Proxy-generation-gives-Error-for-type-EntityAngular

Output on generating the proxy produces an invalid volo models.ts file:

export interface AggregateRoot<TKey> extends BasicAggregateRoot<TKey> {
  extraProperties: Record<string, object>;
  concurrencyStamp?: string;
}

export interface BasicAggregateRoot<TKey> extends Entity<TKey> {
}

export interface Entity {
}

Error message:

Error: src/app/proxy/volo/abp/domain/entities/models.ts:7:51 - error TS2315: Type 'Entity' is not generic.

7 export interface BasicAggregateRoot<TKey> extends Entity<TKey> {
                                                    ~~~~~~~~~~~~

Command run to generate proxy: abp generate-proxy -t ng -m core -u https://localhost:44311

  • ABP Framework version: v9.2.0-preview20250221
  • UI Type: Angular
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth Server Separated
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Is there a suggested way to handle ActionResult custom endpoints e.g. suppose I have a custom controller with a custom endpoint:

namespace Core.Models.Transmittal
{
    [RemoteService(Name = "Core")]
    [Area("core")]
    [ControllerName("Transmittal")]
    [Route("api/core/transmittals")]

    public class TransmittalController : TransmittalControllerBase, ITransmittalsAppService
    {
        [HttpGet]
        [Route("my-custom-endpoint")]
        public async Task<ActionResult<PagedResultDto<string>>> GetMyCustomEndpoint() { ... }

Upon running abp generate-proxy -t ng -m core -u https://localhost:44311 the output is a separate and invalid .ts file:

mvc\models.ts (note: this is invalid Typescript output; the below file does not compile)


export interface ActionResult {
}

export interface ActionResult<TValue> {
  result: ActionResult;
  value: TValue;
}

export interface IActionResult {
}

And in the generated proxy output transmittal.service.ts:

    this.restService.request<any, ActionResult<PagedResultDto<string>>>({
      method: 'GET',
      url: '/api/core/transmittals/my-custom-endpoint',
      params: { },
    },
    { apiName: this.apiName,...config });

The endpoint only uses ActionResult to change the status response e.g. Ok() or NoContent() or some custom status code response but the actual output should just be the PagedResultDto<string>

Is there something I'm missing here? ActionResult<T> responses are a special exception so I'm not entirely sure why the mvc\models.ts output is showing the generated output of ActionResult<TValue> with a result self-referencing itself (this is invalid Typescript generation too so the output does not compile).

  • ABP Framework version: v 9.0.52, (cli: 0.9.23 )
  • UI Type: Angular
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth Server Separated
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
Showing 1 to 2 of 2 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 17, 2025, 10:38