[Typescript-angular2] Inheritance in generated model not working
Description
I use swagger to generate my angular4 client and I have an issue when I have inheritance in my model. The generated typescrpit is not correct. The generated code is :
parent.ts:
export interface Parent{}
child.ts:
import {Parent} from './Parent';
export interface Child extends models.Parent{}
Swagger-codegen version
2.3.0-SNAPSHOT
Swagger declaration file content or url
BaseHospitalVisit: type: object AmbulatoryVisit: allOf: - $ref: '#/BaseHospitalVisit' - type: object
Command line used for generation
Suggest a Fix
Generate: export interface Child extends Parent{}
@sidebaet can you share the spec via https://gist.github.com so that the community can use it to reproduce the issue?
@wing328 I am able to reproduce with: https://gist.github.com/austin94/11642f6482dc2eed7a227979f0b44dfe
The fix for me was to just remove the models. string in modelGeneric.mustache. It appears that this was being used when the models namespace was still around?
@austin94 thanks for sharing more. I wonder if you can file a PR with the suggested fix when you've time.
@wing328 Sure, I can submit a PR in the next few days.