openapi-generator/modules
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
..
swagger-codegen Implement generating interfaces option for api resources, closes #5453. (#5519) 2017-05-23 21:40:21 +08:00
swagger-codegen-cli Add removeOperationIdPrefix option (#5674) 2017-05-21 01:28:06 +08:00
swagger-codegen-maven-plugin Add removeOperationIdPrefix option (#5674) 2017-05-21 01:28:06 +08:00
swagger-generator fix cache skip 2017-04-20 16:49:58 -07:00