ng-openapi-gen icon indicating copy to clipboard operation
ng-openapi-gen copied to clipboard

No need to provide all services in module

Open jornare opened this issue 4 years ago • 1 comments

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

jornare avatar Oct 27 '21 13:10 jornare

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.

luisfpg avatar Nov 15 '21 15:11 luisfpg

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.

luisfpg avatar Jan 04 '23 18:01 luisfpg