Open Closed

Static clientproxies . Where is the attributes? #8449


User avatar
0
DanLo created

When creating static clientproxies in cli how do i get it with attributes? Command i run in PS : abp generate-proxy -t csharp -m customer -url http://localhost:xxxx/

I get files in clientproxis mapp but without attributes.

Her is a part of my generated dto class:

public abstract class CustomerCreateDtoBase
{
    [Required]
    [StringLength(CustomerConsts.NameMaxLength, MinimumLength = CustomerConsts.NameMinLength)]
    public string Name { get; set; } = null!;

    [Required]
    [StringLength(CustomerConsts.StreetMaxLength)]
    public string Street { get; set; } = null!;
    
    [Required]
    [RegularExpression(@"[0-9]+")]
    [StringLength(CustomerConsts.ZipCodeMaxLength, MinimumLength = CustomerConsts.ZipCodeMinLength)]
    public string ZipCode { get; set; } = null!;
    
    [Required]
    [StringLength(CustomerConsts.CityMaxLength)]
    public string City { get; set; } = null!;
    
    [Required]
    [RegularExpression(@"\+[0-9]+-[0-9]+")]
public string PhoneNumber { get; set; } = null!;

We have made services in abp studio so these classes are generated.


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I get files in clientproxis mapp but without attributes.

    The generate-proxy command doesn't support generating the attributes of DTO's properties.

    If you need them, you can copy the DTO class to the clientproxis folder.

    Thanks.

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 20, 2025, 18:00