Hard fork of janephp/janephp with OpenAPI 3.1 support.
A set of libraries to generate PHP models and API clients from OpenAPI 3.1 specifications.
Jane PHP does not support OpenAPI 3.1 (janephp/janephp#759). OAS 3.1 has been the current standard since February 2021, and many API providers publish 3.1 specs exclusively. The upstream maintainers have indicated they welcome PRs but have no roadmap for 3.1 support.
This fork adds:
- Full OpenAPI 3.1 support — handles
typeas array (e.g.["string", "null"]), nullable via type arrays,const,$schema, and other 3.1 features - PHP 8.4 — requires and targets modern PHP
- PHPUnit 11 — test suite fully updated to PHPUnit 11 conventions
- Strict OpenAPI spec validation via
lts/strict-openapi-validator
- PHP 8.4+
composer require longtermsupp/php-openapi-generatorGenerate a client from an OpenAPI 3.1 spec:
vendor/bin/jane-openapi generate --config-file .jane-openapiExample .jane-openapi config:
<?php
return [
'openapi-file' => __DIR__ . '/openapi.yaml',
'namespace' => 'MyApp\Client',
'directory' => __DIR__ . '/generated',
];- Original repository: janephp/janephp
- Original documentation: jane.jolicode.com
- Original license: MIT
Long Term Support Ltd — joseph@ltscommerce.dev
- JoliCode for creating and maintaining Jane PHP
- All original janephp contributors
- Joel Wurtz — original author
- Baptiste Leduc — major contributor
- Alexandre Godreau for the original logo
MIT — see LICENSE. Original work copyright © 2016–2017 Joel Wurtz.