-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Open
Labels
Description
By default, the models that get exported contain a namespace.
interface SomeModel { ... }
export namespace SomeModel {} // here
Is this by design?
ESLint has a no-namespace rule. That suggests that many TypeScript projects have no use for the exported namespace and thus fail to compile.
So, what is the reason to export it?
Was it perhaps initially for Angular 1 projects and environments that use AMD/CommonJS modules?
Possible feature
It could be removed from the default mustache file and thus the export. This would mean a backward incompatible API change for this openapi-generator library. And therefore a major upgrade version probably.
Another option would be to add it in the additional-properties
, like:
npx openapi-generator-cli generate -g typescript-angular --global-property models,supportingFiles additional-properties= noNamespaces=false
This is an addition and would not require a major version update of this project.
jase88aiueo-1234