openapi-generator/modules/swagger-codegen
kirpit e12b22d5ce Implement generating interfaces option for api resources, closes #5453. (#5519)
* Implement generating interfaces option for api resources, closes swagger-api/swagger-codegen#5453.

This commit introduces another _system property_ for typescript-angular2, called `withInterfaces` that is default to `false`. You can activate this flag by:

```
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
-i http://petstore.swagger.io/v2/swagger.json \
-l typescript-angular2 -o samples/server/petstore/springboot/typescript-angular2 \
-D withInterfaces=true
```

If set to `true`, generated api resource classes will be implemented with their interfaces in separate files.

This change should not break and change the behaviour even though `withInterfaces` flag set to `true`. You are also welcome to create your own custom resource class by implementing those generated interfaces as they support defining new attributes with `[others: string]: any;` signature.

* Fix unit test for typescript/angular2 client options for "withInterfaces"

* Use double quote to follow coding standard

* Respect interface naming convention for typescript/angular2

 Create respectful interface names that ends with `Interface` suffix, instead of prefixing with `I` according to typescript naming convention. This is also consistent with their file names that also ends with `Interface.ts`.

 Also fixes the merge conflicts.

* Have better explanation for the `withInterfaces` system config
2017-05-23 21:40:21 +08:00
..
src Implement generating interfaces option for api resources, closes #5453. (#5519) 2017-05-23 21:40:21 +08:00
XhhGitIgnore Revert "Revert "[Java] Add auto-generated documentation in Markdown to Java clients"" 2016-04-22 10:13:54 +08:00
.gitignore use Title attribute as model name 2016-05-14 15:30:57 -04:00
pom.xml Revert "Issue#5376- changes to include swagger version in generated api files (#5449)" (#5489) 2017-04-26 17:53:36 +08:00