photocreate / api-client-generator
This is a toolset to generate API client from Swagger specification.
dev-master
2017-04-27 08:13 UTC
Requires
- php: ^5.6 || ^7.0
- guzzlehttp/guzzle: ^6.2
- pimple/pimple: ^3.0
- symfony/console: ~2.8
- twig/twig: 1.*
Requires (Dev)
- phpunit/phpunit: ^5.7
- phpunit/phpunit-mock-objects: ^3.4
- satooshi/php-coveralls: ^1.0
This package is not auto-updated.
Last update: 2025-04-04 21:36:26 UTC
README
What is api-client-generator?
This is a toolset to generate API client from Swagger specification.
Support languages
Supported languages are as below.
- PHP
Run example
Clone project
$ git clone git@github.com:Photocreate/api-client-generator.git
$ cd api-client-generator
Run docker
$ cd example/petstore
$ docker-compose up -d
Access Swagger-UI
Generate API client
$ cd /path/to/project $ bin/api-client-generator api:client:generate \ > --spec http://localhost:8002/v2/swagger.json \ > --output example/petstore/Petstore.php \ > --class Petstore --namespace "Example\Petstore"
Run test.
$ cd /path/to/project $ vendor/bin/phpunit -c . example/petstore/PetstoreTest.php