zijianhuang / webapiclientgen

Strongly Typed Client API Generators generate strongly typed client APIs in C# .NET and in TypeScript for jQuery and Angular 2+ from ASP.NET Web API and .NET Core Web API
MIT License
167 stars 38 forks source link

In NG FormGroup, support LengthAttribute, RegularExpressionAttribute and PhoneAttribute #141

Closed zijianhuang closed 6 months ago

zijianhuang commented 6 months ago

https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.lengthattribute https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.regularexpressionattribute

and for PhoneAttribute, translate it to pattern(phoneRegex).

zijianhuang commented 6 months ago

and improve HeroesDemo with Angular Material

zijianhuang commented 6 months ago

LengthAttribute available only in .NET 8. Better to implement in OpenApiClientGen first.

zijianhuang commented 6 months ago

Phone constraint may be better to be implement at the application level. Particularly in HTML template with attribute pattern.

zijianhuang commented 6 months ago

RegularExpression is done.