Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.45 KB

introduction.rst

File metadata and controls

46 lines (30 loc) · 1.45 KB

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

Since OpenAPI is supported in both v2 & v3 version, here is Jane version you need depending on your OpenAPI 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