OpenAPI

Jane OpenAPI is a library to generate, in PHP, an http client and its associated models and serializers from a OpenAPI specification: version 3.

Compatibility

Jane supports OpenAPI v2 & v3. Depending on your OpenAPI version, you should use following Jane version:

OpenAPI Jane
v3 ^5.0
v2 ^4.0

Installation

Add this library with composer as a dev dependency (replace version depending on what you need):

composer require --dev jane-php/open-api "^5.0"

This library contains a lot of dependencies, to be able to generate code, which are not needed on runtime. However, the generated code depends on other libraries and a few classes that are available through the runtime package. It is highly recommended to add the runtime dependency as a requirement through composer:

composer require jane-php/open-api-runtime "^5.0"

By default, generated code is not formatted, to make it compliant to PSR2 standard and others format norms, you can add the PHP CS Fixer library to your dev dependencies (and it makes it easier to debug!):

composer require --dev friendsofphp/php-cs-fixer