RicoSuter / NSwag

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

CodeGenerator: Possibility to Configure Suffix for Request/Response Types #2767

Open vsvystun-lohika-tix opened 4 years ago

vsvystun-lohika-tix commented 4 years ago

Hi, I use NSwag.MSBuild to generate C# controllers and request/response models by openapi swagger schema. I've faced an inconvenience with models naming: my domain and API models have the same names. Is it possible to have something like:

This is similar to #455, but for CSharpGenerator

Thank you anyway for a great tool :)

ckarcz commented 3 years ago

I agree, a suffix (and a prefix i guess) option would be great (i.e. "xxxxDto") to prevent type name conflicts of the client and domain types!