Broken typescript-angular default.service.ts
Description
The generated angular file default.service.ts uses wrong import path delimiters on windows installation. import { UpdateInfo } from '../model\updateInfo'; Most propably it is using windows path seperator while doing path concatenation, what is not correct way how angular import path should be constructed.
Expected value is import { UpdateInfo } from '../model/updateInfo';
The generated file has also missing } bracket before EOF.
There is missing body parameter in generated post method:
return this.httpClient.post(${this.basePath}/someurl,
body, ---is missing in generated code
{ ....
The import path issue is also in generated api.module.ts containing import { DefaultService } from './api\default.service';
The generation was invoked by swager-codegen-cli with parameter -l typescript-angular
Swagger-codegen version
3.0.rc2 and 3.0.4
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
Yes, happens the same to me on v3.0.4 from a simple yaml file where my endpoint has one parameter.
Almost the same as https://github.com/swagger-api/swagger-codegen/issues/8930
Regarding to the missing body parameters, any updates on it?
Do you guys know how to rename this DefaultService in config?
I don't know why but the codegen doesn't add the body on post endpoints.
In exemple for me I had:
return this.httpClient.post
So i add manually the , body after the url.
return this.httpClient.post
I think the problem is caused by "isBodyAllowed()" method in "modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenOperation.java". Because after I removed {{#isBodyAllowed}}{{isBodyAllowed}} in "/handlebars/typescript-angular/api.service.mustache" the problem was solved. Of course, there may be other trouble if removing "isBodyAllowed" tag, but it's fine for me.