2017 © Pedro Peláez
 

composer-plugin jane-open-api-autogenerate

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

image

purplebooth/jane-open-api-autogenerate

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

  • Sunday, December 17, 2017
  • by PurpleBooth
  • Repository
  • 2 Watchers
  • 2 Stars
  • 15,682 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 1 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Jane OpenAPI Autogenerate

Scrutinizer Code Quality Build Status Dependency Status Latest Stable Version License, (*1)

This project is designed to allow you to add an automatically generated OpenAPI (swagger) client as a dependency via a composer dependency., (*2)

This project uses jane/open-api., (*3)

Getting Started

Prerequisities

You'll need to install:, (*4)

  • PHP (Minimum 5.6)

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., (*5)

{
    "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, (*6)

$ composer require swagger/petstore

alternatively you could add the package manually in the composer.json, (*7)

{
    "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., (*8)

{
    "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., (*9)

"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., (*10)

Coding Style

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

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

Contributing

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

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository., (*13)

Authors

See the list of contributors who participated in this project., (*14)

License

This project is licensed under the MIT License - see the LICENSE.md file for details., (*15)

The Versions

17/12 2017

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Billie Thompson

composer installer swagger composer-installer jane open api

17/12 2017

dev-analysis-86A6V4

dev-analysis-86A6V4

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Billie Thompson

composer installer swagger composer-installer jane open api

19/03 2017

0.1.6

0.1.6.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Billie Thompson

composer installer swagger composer-installer jane open api

06/09 2016

v0.1.5

0.1.5.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Billie Thompson

composer installer swagger composer-installer jane open api

17/08 2016

v0.1.4

0.1.4.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Billie Thompson

composer installer swagger composer-installer jane open api

17/08 2016

v0.1.3

0.1.3.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Billie Thompson

composer installer swagger composer-installer jane open api

17/08 2016

v0.1.2

0.1.2.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Billie Thompson

composer installer swagger composer-installer jane open api

13/08 2016

v0.1.1

0.1.1.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Billie Thompson

composer installer swagger composer-installer jane open api

12/08 2016

v0.1.0

0.1.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Billie Thompson

composer installer swagger composer-installer jane open api