cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
397 stars 132 forks source link

"An interface can only extend an object type or intersection of object types with statically known members." #109

Open hmil opened 4 years ago

hmil commented 4 years ago

ng-openapi-gen may generate interface code which extends a type alias, which is not permitted in TypeScript.

This happens when combining allOf with oneOf, because allOf is implemented as interface inheritance whereas oneOf is implemented as a type alias.

I think the safest approach is to generate a type alias for schemas which are allOf combinations.

hmil commented 4 years ago

Potential fix in #110