RicoSuter/NSwag

C# Code Generation doesn't validate patterns

Open

#3.145 geöffnet am 6. Nov. 2020

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (1.189 Forks)batch import
help wantedtype: enhancement

Repository-Metriken

Stars
 (6.291 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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?

Contributor Guide