RicoSuter/NSwag

C# Code Generation doesn't validate patterns

Aberta

#3.145 aberto em 6 de nov. de 2020

 (7 comentários) (0 reação) (0 responsável)C# (1.356 forks)batch import
help wantedtype: enhancement

Métricas do repositório

Stars
 (7.358 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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?

Guia do colaborador