Skip to content

[PHP] Allow for private Composer repository in documentation #3836

Closed
@dkarlovi

Description

@dkarlovi
Description

When constructing a PHP client, README.md will include this snippet to add to composer.json:

"repositories": [
    {
        "type": "git",
        "url": "https://github.com/<composerVendorName>/<composerProjectName>.git"
    }
]

As we're generating a private API client with a proper private Composer repo (Satis), usage of our package should include:

"repositories": [
    {
        "type": "composer",
        "url": "https://package.example.com"
    }
]
Swagger-codegen version

@e6049d6d30822c35a13608667637591f6536ad41

Swagger declaration file content or url

config.json

Command line used for generation
swagger-codegen generate -i http://petstore.swagger.io/v2/swagger.json -l php -o . -c ./config.json
Steps to reproduce

There's no way to generate a PHP client without it happening, I don't see a way to provide configuration regarding this. My config.json:

{
    "invokerPackage": "Example",
    "modelPackage": "Example\\Model",
    "apiPackage": "Example\\Api",
    "packagePath": ".",
    "srcBasePath": "src",
    "composerProjectName": "example-php-sdk",
    "composerVendorName": "private"
}

Generated with

swagger-codegen generate -i http://petstore.swagger.io/v2/swagger.json -l php -o . -c ./config.json

Open README.md

Suggest a Fix

Allow for specifying Composer package destination.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions