RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.78k stars 1.29k forks source link

How to set ASP.NET Core Swagger Middleware to generate swagger JSON with flatten complex parameters for GET methods #1783

Open bojanunjic opened 5 years ago

bojanunjic commented 5 years ago

NSwag.AspNetCore.SwaggerExtensions.UseSwaggerUi is marked withObsolete attribute. So, I try to follow instruction and change it with AddSwaggerDocument, UseSwagger and UseSwaggerUi3. However, generated swagger document differs from previous one: now complex parameters for GET methods are not flattened. FromQuery attribute could fix this, but I use custom IModelBinder. Any suggestions?

RicoSuter commented 5 years ago

https://github.com/RSuter/NSwag/wiki/Document-Processors-and-Operation-Processors