jdomenechb / openapi-class-generator
Generate PHP classes from given OpenAPI contracts.
dev-master
2019-09-29 10:56 UTC
Requires
- php: >=7.1
- ext-json: *
- cebe/php-openapi: ^1.2
- doctrine/inflector: ^1.3
- guzzlehttp/guzzle: ^6.3
- nette/php-generator: ^3.2
- psr/http-client: ^1.0
- symfony/console: ^4.3
- symfony/filesystem: ^4.3
- symfony/finder: ^4.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- infection/infection: ^0.13.6
- mikey179/vfsstream: ^1.6
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^0.11.15
- phpstan/phpstan-phpunit: ^0.11.2
- phpunit/phpunit: ^7.5
- rregeer/phpunit-coverage-check: ^0.2.0
- vimeo/psalm: ^3.5
This package is auto-updated.
Last update: 2025-02-21 23:20:33 UTC
README
The aim of this library is to turn an OpenAPI v.3.x contract into PHP classes ready to use for communicate with the service behind the contract.
Installation
composer require jdomenechb/openapi-class-generator
Usage
vendor/bin/ocg generate <inputPathFolder> <outputPathFolder>
WARNING: The contents of the output folder will be deleted entirely at each generation.
The namespace for the generated files can be defined by using --namespace
:
vendor/bin/ocg generate contracts src-generated --namespace An\\Org\\Namespace