Skip to content

File upload missing #10

@Ronsku

Description

@Ronsku

I have a problem with file upload through formData with generated openapi-client.

  • I create a new post with type 'file':

screen shot 2017-03-27 at 15 43 12

  • All good in swagger UI:
    screen shot 2017-03-27 at 15 45 13

  • openapi-client generates Typescript type error "[ts] Cannot find name 'file'.":

screen shot 2017-03-27 at 15 41 51

  • I resolved the type error by having "file" replaced with "File" (big F https://developer.mozilla.org/en/docs/Web/API/File) with following PR Feature/add type file #11.

  • But the actual file upload still doesn't work since request headers doesn't get Content-Type: "multipart/form-data" and there is no request payload either.
    screen shot 2017-03-27 at 15 49 59

  • It should look something like this to work:
    screen shot 2017-03-27 at 15 53 07
    screen shot 2017-03-27 at 15 56 12

  • File upload feature would be very handy to have in this openapi-client!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions