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

Posting array of strings in multipart location #150

Closed dpk125 closed 2 years ago

dpk125 commented 7 years ago

Is it possible to post array of multipart strings (files)? Right now I have to list each parameter manually, which isn't very flexible:

"parameters": {
    "files[0]": {
        "location": "multipart",
        "type": "any",
        "required": false
    },
    "files[1]": {
        "location": "multipart",
        "type": "any",
        "required": false
    },
}

I've also tried this:

"files": {
    "location": "multipart",
    "type": "array",
    "items": { "type": "string" },
},

but it doesn't work, because MultiPartLocation or Psr7\MultipartStream doesn't handle array properly.

Multipart additionalParameters would probably solve my issue, but I guess it hasn't been implemented yet. https://github.com/guzzle/guzzle-services/issues/125

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. :)