abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.92k stars 3.45k forks source link

Incorrect and Duplicate Import Paths Generated by abp generate-proxy Command #20621

Closed laghmariAm closed 1 month ago

laghmariAm commented 2 months ago

Description

Hi ABP Team,

We are using ABP.IO in our .NETCore Angular project, and we have encountered an issue with the abp generate-proxy command when generating Angular proxies for our repositories.

Problem: The proxy generation command abp generate-proxy -t ng -m repo is generating duplicate and incorrect import paths. For example:

import type { EntityDto } from '@abp/ng.core';
import type { eG } from '../../../domain/shared/enums/e-gform-type.enum';
import type { eA, eC, eG, eV } from '../../../domain/shared/enums/models';
import type { eC} from '../../../domain/shared/enums/e-cda-document-level.enum';
import type { eA } from '../../../domain/shared/enums/e-administration-approach-site.enum';
import type { eV } from '../../../domain/shared/enums/e-vaccination-type.enum';

The line: import type { eA, eC, eG, eV } from '../../../domain/shared/enums/models'; is incorrect because there is no models folder in the backend.

Known Workarounds

Workaround: We are manually removing these incorrect lines every time the proxy is generated, which is not ideal.

Version

8.1.4

Could you please let us know if this is a known issue or if there is something we can do to fix this? Any guidance or suggestions would be greatly appreciated.

Thank you!

willignicolas commented 2 months ago

Any news about this proxy generation issue ? We can provide part of the api-definition endpoint result if needed.

Thanks for your help.

masum-ulu commented 1 month ago

Hi @laghmariAm can you provide models and AppServices for the re-produce error. Or if you have, can you send example project ? You can send to masum.ulu@volosoft.com mail

masum-ulu commented 1 month ago

Couldn't re-produce step. When the steps provided we can re-open