RicoSuter/NSwag
View on GitHubAdd support for explicit inclusion of binding attributes in C# Controller generation
Open
#1,440 opened on Jul 5, 2018
help wantedproject: NSwag.CodeGeneration.CSharp (Controllers)
Repository metrics
- Stars
- (6,291 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
My swagger file uses query parameters for string list types, but the generated code does not include the necessary [FromUri] attribute to ensure query parameter bindings are used. Instead, the default WebAPI rules for parameter binding assume content/body bindings. This forces me to add this attributes in my deriving classes which is redundant considering I already specified a query parameter binding in my swagger file.