mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
e12b22d5ce
* 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 |
||
---|---|---|
.. | ||
swagger-codegen | ||
swagger-codegen-cli | ||
swagger-codegen-maven-plugin | ||
swagger-generator |