ng-openapi-gen
ng-openapi-gen copied to clipboard
No need to provide all services in module
Since all auto-generated services are provided in 'root', there is no longer a reason to provide them in the module itself. https://angular.io/guide/providers
Yes, the module was kept since ng-swagger-gen.
However, for projects depending on a provided ApiConfiguration, those would need to provide it themselves instead of via importing the generated module.
I'll leave this issue open to change the default to false and later on completely removing the module generation.
In fact, we've ourselves stopped using the module recently.
Actually, it is possible to configure the root url using the ApiModule.forRoot() method. See https://github.com/cyclosproject/ng-openapi-gen#specifying-the-root-url--web-service-endpoint
So I'll leave it, because the module can still be configured to not be generated.