- ABP Framework version: v8.2.1
- UI Type: Angular
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): separeted
- Exception message and full stack trace: -
- Steps to reproduce the issue:
When I generate proxies for my angular application files are broken because of broken imports. I have noticed that it might be related to PagedResultDto<T> So make endpoint which returns object which extends PagedResultDto<MyObject> then generate proxies like this: abp generate-proxy -t ng -m app --target MyProject -a default Then you noticed that in model file there is extra import for MyObject even when MyObject is declared in same file. Here is one example of our proxy model:
import type { VendorDto } from '../scm/master-data-management/vendors/models';
import type { PagedResultDto } from '@abp/ng.core';
import type { CalculatedOrderProposalSummaryItemDto } from './models';
import type { OrderProposalFocusBarValuesDto } from '../order-proposal-focus-bar-values/models';
export interface CalculatedOrderProposalSummaryItemDto {
vendor: VendorDto;
vendorGroupName?: string;
}
export interface PagedOrderProposalSummaryItemResultDto extends PagedResultDto<CalculatedOrderProposalSummaryItemDto> {
focusBarValues: OrderProposalFocusBarValuesDto;
calculationDate?: string;
}
So here CalculatedOrderProposalSummaryItemDto is imported even that it is declared in same file. So fix would be don't import interface when it is declared in same file.
This started to happend after we upgraded from abp 7 to abp 8.
5 Answer(s)
-
0
I found this similar Support ticket. https://abp.io/support/questions/6657/Generation-of-Service-Proxies-for-Angular-not-handling-subclasses-of-PagedResultDtoT-correctly Last answer is not acceptable. At least you need to try fix it. Or say you will at future.
-
0
Hello, this specific proxy generation problem could have been solved within this release by this fix.
If you think that your case is different, you can provide more detail so that I can assist you further.
-
0
Hello, I did assume as well that this was same bug but apparently is isn't. Because as you can se I'm working already 8.2.1 version. Try to create this kind of endpoint: [HttpGet] public virtual Task<PagedResultDto<MyDto>> GetListAsync() { return _myAppService.GetListAsync(); } And then generate proxies with this tool of yours like this: abp generate-proxy -t ng -m app --target MyApplication -a default
-
0
-
0
Ok. So my assumption was incorrect. I will try to discover and find similarities from all problematic proxies to identify what could make them beahave differently from others. I'm not sure do I have time reserved to make example project now. I will inform this to my product officer.