-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defining a file upload endpoint #476
Comments
hi! i skipped this on purpose initially, because it's only well defined when used with a MIME type listing. basic annotation (e.g. drf-spectacular/tests/test_extend_schema.py Lines 192 to 199 in b35b4bf
i added this now as it is in fact a missing feature. however, it will only work for |
Wonderful! Thanks. It works very well. Here's how I use it for defining file uploads using multipart: extend_schema(
operation_id='upload_file',
request={
'multipart/form-data': {
'type': 'object',
'properties': {
'file': {
'type': 'string',
'format': 'binary'
}
}
}
},
) I believe these 2 doc strings can be updated: |
awesome! good point. updated the doc strings. |
I'm trying to define an endpoint which is a pure file upload API and doesn't depend on a model
swagger ref: https://swagger.io/docs/specification/describing-request-body/file-upload/#multipart
Tried setting this, but seems like I'm missing something.
The text was updated successfully, but these errors were encountered: