RicoSuter/NSwag

Making ServiceProviderResolver.GetServiceProvider() public so other generator projects can use it too?

smoerijf opened this issue · 1 comments

ServiceProviderResolver.GetServiceProvider(assembly) in the NSwag.Commands package is currently internal. It contains a very useful foundation for generating code (or other stuff) based on a startup assembly's IServiceProvider.

I'm working on a cli tool to export AsyncAPI.json/yml from an assembly for the Saunter AsyncAPI project. It would really help if GetServiceProvider() could be used. (As a Proof of Concept I'm using reflection to call into this internal class).

Would the NSwag project be willing to expose this class to be used outside of NSwag tooling?

(I can make a Pull Request if this request would be accepted.)

Not needed anymore, used the Entity Framework variant instead, that was already publicly available through Microsoft.EntityFrameworkCore.Design Nuget Package --> https://github.com/dotnet/efcore/blob/main/src/EFCore.Design/Design/Internal/AppServiceProviderFactory.cs#L38