RicoSuter / NSwag

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

Add an extension point after C# class definition #4819

Open gturri opened 3 months ago

gturri commented 3 months ago

This makes it possible to generate code that knows the name of the generated class.

(the practical use case I have is adding a method that would register several instances of the generated client (each with a different authentication method) in my DI)

Nb: an alternatives to this commit would be to leverage an extension point in the File.liquid, but at this point the name of the generated classes are not available