Bogdanp / molten

A minimal, extensible, fast and productive framework for building HTTP APIs with Python 3.6 and later.

Home Page:https://moltenframework.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to test api with Swagger UI to upload file/s

gurvindersingh opened this issue · comments

As discussed on the reddit thread there is issue with current swagger api generation. It does shows the content type option as multipart/form-data but doesn't give option to browse and upload the file.

It might be related to the missing format: binary option as mentioned in https://swagger.io/docs/specification/describing-request-body/file-upload/

What version of molten are you using?

0.7.1

@Bogdanp in case if you want to reproduce the issue, this is the repo which has all the code https://github.com/gurvindersingh/mlapp simply run it using gunicorn app:app and its /predict route.

Let me know if you need any more info to get this one fixed.

Thanks! This should be fixed in 0.7.2, but you're going to have to select the multipart mime type from the UI.

It seems the UI still doesn't show the upload file option. Even when selected the correct encoding. See the pic below from the upload example app in examples directory.
screenshot_2018-11-11 molten docs

@gurvindersingh you have to click "Try it out".

@Bogdanp Sorry for such a silly mistake. Thanks it works :)

No worries!