RicoSuter/NSwag

C# Code Generation doesn't validate patterns

オープン

#3,145 opened on 2020/11/06

 (7 件のコメント) (0 件のリアクション) (0 人の担当者)C# (1,356 件のフォーク)batch import
help wantedtype: enhancement

Repository metrics

Stars
 (7,358 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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?

コントリビューターガイド