Flassger support for parameter type:file
DaniloMurbach opened this issue · comments
Hello, is there any way to use flasgger to have a parameter type as File ?
For example here is the yml :
Get The Audio Transcription
tags:
- My TAG API
consumes: - multipart/form-data
parameters: - name: audiofile
in: formData
type: file
required: true
description: The audio file to upload
responses:
200:
description: OK
schema:
key: file
Here is how the swagger looks with this yaml
![Screen Shot 2023-12-15 at 00 56 42](https://private-user-images.githubusercontent.com/18285060/290720614-7585336b-dce7-4704-995a-dbb71c4defa5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDU0MjE5MjksIm5iZiI6MTcwNTQyMTYyOSwicGF0aCI6Ii8xODI4NTA2MC8yOTA3MjA2MTQtNzU4NTMzNmItZGNlNy00NzA0LTk5NWEtZGJiNzFjNGRlZmE1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTE2VDE2MTM0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5OTI4YzdjZjNmYTk0ZmE1Njg3YWUxNjlmZGVmMDhmZTBmM2M4YTJmY2NmZWI5MWM2YTMzZDQ1MWQxMDAxNTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.d867zZyeHmt93_gW5feUkqbRPxUOydpqqkHNPWScynw)
However any time that i try to use it i can see the following error
Traceback (most recent call last):
File "/Users/danilomurbach/Library/Python/3.9/lib/python/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "/Users/danilomurbach/Library/Python/3.9/lib/python/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/danilomurbach/Library/Python/3.9/lib/python/site-packages/flask/app.py", line 1821, in full_dispatch_request
rv = self.preprocess_request()
File "/Users/danilomurbach/Library/Python/3.9/lib/python/site-packages/flask/app.py", line 2313, in preprocess_request
rv = self.ensure_sync(before_func)()
File "/Users/danilomurbach/Library/Python/3.9/lib/python/site-packages/flasgger/base.py", line 677, in before_request
type=self.SCHEMA_TYPES[
KeyError: 'file'
Here is my pip freeze:
flasgger==0.9.5
Flask==2.2.5
Flask-Cors==3.0.10
Flask-RESTful==0.3.9
flask-restplus==0.13.0
Flask-SQLAlchemy==3.0.5
flask-swagger==0.2.14
jsonify==0.5
jsonschema==4.17.3
Werkzeug==3.0.1