RicoSuter/NSwag

C# Code Generation doesn't validate patterns

Open

#3145 aperta il 6 nov 2020

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)C# (1189 fork)batch import
help wantedtype: enhancement

Metriche repository

Star
 (6291 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Hi everyone,

I noticed that the C# code generation doesn't validate patterns (on the client side). If I annotate a parameter of type string with a pattern (e.g. "^v[1-9]$"), I expect the Api method to throw an ApiException when the supplied string doesn't match the pattern.

I'd be happy to open a PR. Is that something this project could use?

Guida contributor