Yuriy Belenko
72dcee9d86
[Slim] Abstract API controllers ( #1483 )
...
* [Slim] Add abstract prefix to API controllers
* [Slim] Add userClassname property to codegen
* [Slim] Add src folder to Composer autoload
* [Slim] Change template to produce abstract controllers
* [Slim] Update API tests template
* [Slim] Add implementation note
* [Slim] Remove deprecated AbstractApiController
* [Slim] Refresh samples
2018-12-23 23:51:26 +08:00
William Cheng
8c599ebf12
Add support for multiple inheritance ( #1664 )
...
* add all parent names
* clean up supportsInheritance
* fix npe
* fix allVars, fix test cases
* add more tests, remove comments
* update docker m2 cache dir, add more tests, fix mandatory
* update samples
* regenerate js spec files
* add logic to detect self reference
* add isSelfReference flag to codegen property
* add ruby tests for cat model
* remove debugging info
* fix JS allvars not have x-js-doctype
* update samples
* update js samples
2018-12-15 00:24:36 +08:00
William Cheng
774013c7e1
Better OpenAPI spec v3 support: allOf, anyOf, oneOf ( #1360 )
...
* add oneOf support to Ruby
* add anyOf support to ruby client
* add discriminator support to ruby client
* fix typo
* update samples, fix NPE
* better format in ruby generator
* fix test cases, disable mapping test
* fix update script, update samples
* add test, fix mapping
* update exit code
* reenabled discriminator test
* remove duplicated properties
* add test for duplicated properties
* update samples, add new spec
* fix ruby test cases
* fix hasMore after removing duplicates
* refactor method, comment out haskell client test
* fix hasMore and update samples
* fix parent detection
* fix discriminator check
* [haskell-http-client] need to use {{vars}}{{required}} instead of {{requiredVars}}
* remove deprecated methods in default codegen (#1031 )
* regenerate samples
* remove commented code
2018-12-07 00:30:20 +08:00
William Cheng
1b2f3fbfb6
Fix alias to map response ( #1067 )
...
* fix response reference to map
* update samples
* add null check for openapi
2018-09-20 19:29:33 +08:00
Yuriy Belenko
15cec0ae09
[Slim] Add PHP CodeSniffer to check coding style ( #897 )
...
* [Slim] Add PHP CodeSniffer package
* [Slim] Add phpcsStandard generator option
We follow PSR-2 coding style guide in PHP generators. It might be convenient
for users to specify own coding standard without modifying templates. That's
why I've added this option.
At first, I thought to add option validation and accept only standards from
predefined list. But this option also can be a full path to the standard's
root directory, I've changed my mind. User should use this option with caution.
Ref to all PHP CodeSniffer CLI options:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage
* [Slim] Extend readme with PHP CodeSniffer docs
* [Slim] Format templates to meet PSR-2
* [Slim] Refresh samples
2018-08-26 15:26:09 +05:00
Akihito Nakano
6d6ef0f120
[PHP] Refactor php client generator ( #504 )
...
* Extends AbstractPhpCodegen instead of DefaultCodegen
* Remove fully duplicated methods with AbstractPhpCodegen
* Remove duplicated properties with AbstractPhpCodegen
* Remove duplicated codes in constructor with AbstractPhpCodegen
* Add typeMapping "date". Moved from PhpClientCodegen
refs: 3c34c0b377 (diff-f1801ef05a7926bf394c90f44ae4ab3dL132)
* Remove duplicated codes in processOpts()
* Remove unnecessary 'implements'
* Remove unnecessary method override
* Use setter
* Merge getTypeDeclaration() into AbstractPhpCodegen
* Merge processOpts() into AbstractPhpCodegen
refs:
* 296e6d3db4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL139)
* 296e6d3db4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL147)
* 296e6d3db4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL153)
* tweak
* Optimize IF statement
* Remove duplicated methods
* Merge setParameterExampleValue() into AbstractPhpCodegen
* Merge toEnumVarName() into AbstractPhpCodegen
* Merge toEnumName() into AbstractPhpCodegen
* Merge escapeUnsafeCharacters() into AbstractPhpCodegen
* Merge postProcessOperationsWithModels() into AbstractPhpCodegen
* tweak
* Recover missing method
refs: 2ad0f6f7d4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL91)
* Tweak test case
refs: 4e7b7afc1a
* Remove unnecessary 'import'
* Update lumen and ze-ph samples
- ./bin/php-lumen-petstore-server.sh > /dev/null 2>&1
- ./bin/php-ze-ph-petstore-server.sh > /dev/null 2>&1
* Update slim samples
* Fix script name
* Update silex samples
* Update kotlin-server
2018-07-17 09:27:02 +08:00
Yuriy Belenko
925ae68167
[Slim] Generation of UnitTest stubs ( #566 )
...
* [Slim] Add PHPUnit4 to Composer
* [Slim] Configure PHPUnit
* [Slim] Add Model and Api test templates
* [Slim] Refresh Slim samples
2018-07-16 14:25:48 +09:00
Yuriy Belenko
9eeedede49
[Slim] Improve codebase decouple ( #438 )
...
* [Slim] Decouple Api files into separated PHP Classes
This enhancement required for modular testing and code coverage generating.
* [Slim] Define all app routes in SlimRouter PHP Class. Generate new samples
2018-07-06 14:37:14 +08:00