pyopenapi / pyswagger

An OpenAPI (fka Swagger) client & converter in python, which is type-safe, dynamic, spec-compliant.
MIT License
385 stars 89 forks source link

POST data with Microsoft Office MIME type #96

Open AlexeKorneev opened 8 years ago

AlexeKorneev commented 8 years ago

Hello again,

Could you help with following question: I need to POST content of XLSX file using Microsoft Office MIME type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', right now always get:

File "C:\Python27\lib\site-packages\pyswagger\primitives\codec.py", line 28, in marshal raise Exception('Could not find codec for %s, value: %s, args: %s' % (mime, value, kwargs)) Exception: Could not find codec for application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

What would be the proper way to do this using Pyswagger? Should I create some customized MIME codec like it is described here: https://github.com/mission-liao/pyswagger/blob/master/docs/md/tutorial/mime.md

Thanks in advance! Alexey

mission-liao commented 8 years ago

Yes, that's a hook for users to provide custom mime types.