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.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09