guzzle / guzzle-services

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.
MIT License
253 stars 78 forks source link

Allow "file" as parameter type #124

Closed Konafets closed 2 years ago

Konafets commented 7 years ago

Consider the following description of an operation:

...
'doMultiPartLocation' => [
    'httpMethod' => 'POST',
    'uri' => '/multipartLocation',
    'parameters' => [
        'foo' => [
            'type' => 'string',
            'required' => false,
            'description' => 'Testing multipart request location',
            'location' => 'multipart'
        ],
        'file' => [
            'type' => 'any',
            'required' => false,
            'description' => 'Testing multipart request location',
            'location' => 'multipart'
        ]
    ],
    'responseModel' => 'MultipartResponse'
],
...
$client->doMultiPartLocation([
    'file' => fopen('test.html', 'r'),
]);

There is only 'any' as a valid file type available to specify the parameter. We should add 'file' here.

GrahamCampbell commented 2 years ago

Closing since stale - I'm doing a cleanup across the whole organization, to enable us to focus on the tickets that are still live and have interest. Please feel free to open a new issue if this still is important to you. :)