Starts in:
1 DAY
19 HRS
25 MIN
39 SEC
Starts in:
1 D
19 H
25 M
39 S
Open Closed

generate-proxy does not create Domain.Shared Const files on Angular side #1955


User avatar
0
enes.koroglu created
  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

We need Entity Max and Min Length constants which we define in Domain.Shared\***Consts.cs files on Angular to be generated via generate-proxy. For now we should change same info both aspnet-core and angular projects every time when we make a change. Is there a way to generate this constants on Angular side via generate-proxy?


3 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    ***Consts.cs files are not API Controllers and they don't have any endpoints. Proxy generation generates code from swagger.json. So if you expose your consts with a Controller, proxy generation will be able to generate that endpoint.

  • User Avatar
    0
    enes.koroglu created

    Regarding your idea, DTO files are also included in Swagger so I think proxy generation should generate MinLength and MaxLength for Code and Name properties of MarketPlaceCreateDto but there is nothing in Angular side with that values.

  • User Avatar
    0
    bunyamin created

    Hello,

    Proxy generation isn't about validation. What proxy-generation does is to create services and DTOs in your angular application to make it easier to make requests to the backend. Suite, on the other hand, creates entity crud pages as well as proxies. And validation is being handled on the component rather than the service. You can use the suite to generate your entities.

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