sturents / swagger-php-model-generator
0.2.2
2024-08-28 15:57 UTC
Requires
- php: >=7.4 <8.3
- nette/php-generator: 3.6.9
- psr/http-message: ^1.1 || ^2.0
- symfony/serializer: 5.4.36
- symfony/yaml: 5.4.35
Requires (Dev)
- roave/security-advisories: dev-latest
README
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