Open Closed

Incorrectly generating angular frontend service proxy files with double Saas prefix for saas classes #9789


User avatar
0
vwoerner created

Is there a fix for the problem described in #8818?

My problem is a tiny bit different from #8818: I still have the double Saas in the type

tenant: SaasSaasTenantDto;

but the import now is correct:

import type { SaasTenantDto } from '../../../volo/saas/host/dtos/models';

https://abp.io/support/questions/8818/incorrectly-generating-fronted-service-proxy-files-with-double-Saas-prefix-for-saas-classes


5 Answer(s)
  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello,

    I cannot produce the same problem on my end after running such command using the latest ABP version abp generate-proxy -t ng -url https://localhost:[yourPort] -m saas

    Could you send me a minimal, reproducible example so that I could assist you further. Here is my e-mail address: sumeyye.kurtulus@gmail.com.

    Thank you for your cooperation.

  • User Avatar
    0
    vwoerner created

    I sent you a minimal example

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello again, I am sorry for sending over the wrong e-mail address. Could you please forward that here this address: sumeyye.kurtulus@volosoft.com

  • User Avatar
    0
    vwoerner created

    I sent you the minimal example to your correct address.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello again,

    Thank you for your patience and cooperation. We will be fixing this problem in the next patch version.

    You can follow the process here: https://github.com/abpframework/abp/issues/23610, https://github.com/abpframework/abp/releases

    Until then, I can suggest you to modify this file temporarily

    // node_modules/@abp/ng.schematics/utils/model.js
    
    exports.resolveAbpPackages = resolveAbpPackages;
    function renamePropForTenant(interfaces) {
        for (const inters of interfaces) {
            for (const prop of inters.properties) {
                const isTenant = prop.name.toLocaleLowerCase().includes(constants_1.TENANT_KEY);
                const isSaasDto = prop.refs.filter(f => f.startsWith(constants_1.SAAS_NAMESPACE)).length > 0;
                // you need to add `!prop.type.startsWith('Saas')` to avoid duplication
                if (isTenant && isSaasDto && !prop.type.startsWith('Saas')) {
                    prop.type = 'Saas' + prop.type;
                }
            }
        }
    }
    

    I am also processing a refund for your ticket.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 01, 2025, 08:37