swagger-codegen
swagger-codegen copied to clipboard
[TypescriptAngular] Several Bugs
Description
- When
interfacesoption is activated:
- It generates
"endpoint".serviceInterface-like files. - However
"endpoint.service.tsclass:import { AccountServiceInterface } from './AccountServiceInterface';So,AccountServiceInterfacefile doesn't exist. So compiler breaks.
- When
inerfacesoption is activated:
- It generates
"endpoint".serviceInterface-like files. - On there models are imported. Currently, I'm not using any model, however it generates this line:
import * as models from '../model/models';. So compiler breaks.
- Also,
index.tsalso exports models, regardless of whether models exist.
- This line is generated:
export * from './model/models'; - So, compiler is telling: `file: ...index.ts' .../models.ts is not a module.'
Swagger-codegen version
I'm using last 3.0.0 branch.
cc @TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx
This is an edge case that wasn't consider it looks like. Most people have models so that wasn't covered. We could either generate an empty models file or conditionally generate that line based on if we have it or not.
As for the interface issue I never really understood the purpose of the interfaces but I'll try to check it out sometime this week
I'll try to check it out sometime this week
Me too.
@feikede can you fix it ?