I'd be happy to have a look if I'm able to provide a pull request for this feature request, if nobody is already working on this. I had a look in the issue tracker but there was only a request for changing it from Api to Service and another unrelated request for adding a possiblity to define a suffix in the JAXRs generator.
Description
In earlier versions the generated service classes were suffixed with "Api". Recently this has changed to be "Service". While this adheres to angular standards it sometimes can cause collisions with existing services. For me it would make sense to use the api suffix because of multiple reasons.
-
We avoid collisions. If I have a UserService in my client and somebody introduces a UserApi, suddenly I need to alias my imports in order to use both services in one place.
-
Having the .api file extensions and the Api suffix in the class name, it makes it more clear to the developer, that this is not a normal service. If you work in our project then you know that apis are always generated.
Suggest a fix/enhancement
Introduce a configuration for typescript-angular2 which lets you specify a different suffix.
I'd be happy to have a look if I'm able to provide a pull request for this feature request, if nobody is already working on this. I had a look in the issue tracker but there was only a request for changing it from Api to Service and another unrelated request for adding a possiblity to define a suffix in the JAXRs generator.
Description
In earlier versions the generated service classes were suffixed with "Api". Recently this has changed to be "Service". While this adheres to angular standards it sometimes can cause collisions with existing services. For me it would make sense to use the api suffix because of multiple reasons.
We avoid collisions. If I have a UserService in my client and somebody introduces a UserApi, suddenly I need to alias my imports in order to use both services in one place.
Having the .api file extensions and the Api suffix in the class name, it makes it more clear to the developer, that this is not a normal service. If you work in our project then you know that apis are always generated.
Suggest a fix/enhancement
Introduce a configuration for typescript-angular2 which lets you specify a different suffix.