photocreate/api-client-generator

This is a toolset to generate API client from Swagger specification.

dev-master 2017-04-27 08:13 UTC

README

CircleCI Coverage Status

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

See http://localhost:8002/

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