Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 543 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 543 Bytes

Swagger PHP Model Generator

Generates simple models with no dependencies from a Swagger/Open API 2.0 file

Install using composer

composer require sturents/swagger-php-model-generator

Run with:

$generator = new SwaggerGen\GenerateAll('MyNamespace', '/path/to/api.yaml', '/path/to/library/src/');
echo $generator->saved_models.' - '.$generator->saved_requests;

Or run simply from this repo using:

php example.php --yaml-path /path/to/api.yaml --model-dir /path/to/generate/models --namespace MyNamespace