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

Support constructor in protectedMethods #2418

Open ghost opened 5 years ago

ghost commented 5 years ago

I would like the generated constructor to be protected and require me to implement a constructor in my partial implementation. Can this be supported?

peteraritchie commented 3 years ago

+1... the scenario I'm looking at is making the c'tor protected, then create an overload in the partial class in order to create a constructor that ASP.NET Dependency Injection can use.

RicoSuter commented 3 years ago

Can you propose a PR with this change? Do we need a new config to avoid breaking changes?

AntonSmolkov commented 2 years ago

+1 one for the feature

AlterX76 commented 1 year ago

Any news on this?