PHPackages                             purplebooth/jane-open-api-autogenerate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. purplebooth/jane-open-api-autogenerate

AbandonedArchivedComposer-plugin[API Development](/categories/api)

purplebooth/jane-open-api-autogenerate
======================================

This is a plugin for composer that allows you to generate a client from a given swagger definition

0.1.6(9y ago)215.7k7[1 PRs](https://github.com/PurpleBooth/jane-open-api-autogenerate/pulls)MITPHP

Since Aug 12Pushed 5y ago2 watchersCompare

[ Source](https://github.com/PurpleBooth/jane-open-api-autogenerate)[ Packagist](https://packagist.org/packages/purplebooth/jane-open-api-autogenerate)[ RSS](/packages/purplebooth-jane-open-api-autogenerate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (9)Used By (0)

Jane OpenAPI Autogenerate
=========================

[](#jane-openapi-autogenerate)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7e14cbb6c1eb5659c6b7fa55bf5f08b8cef25565a389b06b7778f28d7c166f55/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f507572706c65426f6f74682f6a616e652d6f70656e2d6170692d6175746f67656e65726174652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/PurpleBooth/jane-open-api-autogenerate/?branch=master)[![Build Status](https://camo.githubusercontent.com/d5759b4d4358a045e5709f36a843157af45b519d6ec61925071cde9961087990/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f507572706c65426f6f74682f6a616e652d6f70656e2d6170692d6175746f67656e65726174652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/PurpleBooth/jane-open-api-autogenerate/build-status/master)[![Dependency Status](https://camo.githubusercontent.com/bc9204a2b9f64568d92e0dab9cb493610fb9fc37aa923adc96b7559c652fabe4/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3537616430616436636235646632303033316136346135632f62616467652e7376673f7374796c653d666c61742d737175617265)](https://www.versioneye.com/user/projects/57ad0ad6cb5df20031a64a5c)[![Latest Stable Version](https://camo.githubusercontent.com/3615ec7823e005a55ffb6d653d551fddc62e69ada48c88b37a0d824cfe0642cf/68747470733a2f2f706f7365722e707567782e6f72672f707572706c65626f6f74682f6a616e652d6f70656e2d6170692d6175746f67656e65726174652f762f737461626c65)](https://packagist.org/packages/purplebooth/jane-open-api-autogenerate)[![License](https://camo.githubusercontent.com/189242c4921148c2a21c81bbc7e6a25c4f97b82fed43de0a309b88731a02aece/68747470733a2f2f706f7365722e707567782e6f72672f707572706c65626f6f74682f6a616e652d6f70656e2d6170692d6175746f67656e65726174652f6c6963656e7365)](https://packagist.org/packages/purplebooth/jane-open-api-autogenerate)

This project is designed to allow you to add an automatically generated [OpenAPI (swagger)](https://openapis.org/) client as a dependency via a composer dependency.

This project uses [jane/open-api](https://github.com/jolicode/jane-openapi).

Getting Started
---------------

[](#getting-started)

### Prerequisities

[](#prerequisities)

You'll need to install:

- PHP (Minimum 5.6)

Usage
-----

[](#usage)

You have a few options, you could add to the repository you keep your swagger definition define a composer.json that looks something like this.

```
{
    "name": "swagger/petstore",
    "type": "swagger-api",
    "extra": {
        "namespace": "Swagger\\Petstore",
        "schema-file": "swagger.json"
    },
    "autoload": {
        "psr-4": {
            "Swagger\\Petstore\\": "generated/"
        }
    },
    "require": {
        "purplebooth/jane-open-api-autogenerate": "^0.1.4"
    }
}
```

and then run

```
$ composer require swagger/petstore

```

alternatively you could add the package manually in the composer.json

```
{
    "require": {
        "swagger/petstore": "0.1.0",
        "purplebooth/jane-open-api-autogenerate": ""
    },
    "repositories": [{
        "type": "package",
        "package": {
            "autoload": {
                "psr-4": {
                    "Swagger\\Petstore\\": "generated/"
                }
            },
            "type": "swagger-api",
            "name": "swagger/petstore",
            "version": "0.1.0",
            "extra": {
                "namespace": "Swagger\\Petstore",
                "schema-file": "/path/to/swagger.json"
            },
            "require": {
                "purplebooth/jane-open-api-autogenerate": "v0.1.4"
            },
            "dist" : {
              "type": "path",
              "url": "/path/to/swagger.json"
            }
        }
    }]
}
```

You do not need to provide a dist/source directory if we're not checking out your swagger.json from somewhere.

```
{
    "require": {
        "swagger/petstore": "0.1.0",
        "purplebooth/jane-open-api-autogenerate": ""
    },
    "repositories": [{
        "type": "package",
        "package": {
            "autoload": {
                "psr-4": {
                    "Swagger\\Petstore\\": "generated/"
                }
            },
            "type": "swagger-api",
            "name": "swagger/petstore",
            "version": "0.1.0",
            "extra": {
                "namespace": "Swagger\\Petstore",
                "schema-file": "http://example/path/to/swagger.json"
            },
            "require": {
                "purplebooth/jane-open-api-autogenerate": "v0.1.4"
            }
        }
    }]
}
```

Another feature of this library is the ability to override the swagger file from a location defined by an environment variable. To do this you simply define an additional key in the package specifies in which environment variable.

```
"extra": {
    "namespace": "Swagger\\Petstore\\",
    "schema-file": "/path/to/swagger.json",
    "environment-variable": "PETS_SWAGGER_YAML"
},
```

If it's not set it'll fall back to the value defined in the schema-file attribute.

### Coding Style

[](#coding-style)

We follow PSR2, and also enforce PHPDocs on all functions. To run the tests for coding style violations

```
vendor/bin/phpcs -p --standard=psr2 src/
```

Contributing
------------

[](#contributing)

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/purplebooth/jane-open-api-autogenerate/tags).

Authors
-------

[](#authors)

See the list of [contributors](https://github.com/purplebooth/jane-open-api-autogenerate/contributors) who participated in this project.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~53 days

Total

7

Last Release

3341d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25c07c3e1106894ada5c64a88d9efe13c25e5529775928d75c63e8fb94b600d3?d=identicon)[PurpleBooth](/maintainers/PurpleBooth)

---

Top Contributors

[![PurpleBooth](https://avatars.githubusercontent.com/u/133327?v=4)](https://github.com/PurpleBooth "PurpleBooth (44 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

composerswaggerinstallercomposer-installerjaneopen-api

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/purplebooth-jane-open-api-autogenerate/health.svg)

```
[![Health](https://phpackages.com/badges/purplebooth-jane-open-api-autogenerate/health.svg)](https://phpackages.com/packages/purplebooth-jane-open-api-autogenerate)
```

###  Alternatives

[swagger-api/swagger-ui

 Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

28.7k45.4M99](/packages/swagger-api-swagger-ui)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

596161.9M1.9k](/packages/dealerdirect-phpcodesniffer-composer-installer)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[jane-php/open-api-3

Generate a PHP Client API (PSR7/PSR18 compatible) given a OpenApi 3.x specification

201.4M87](/packages/jane-php-open-api-3)[adrenalinkin/swagger-resolver-bundle

Provides possibility for validate data according to Swagger documentation

1013.3k](/packages/adrenalinkin-swagger-resolver-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
