I would like to inform the file extension and file type to the OpenAPI.
E.g.:
Content-Disposition: form-data; name="fileName"; filename="*.txt"
Content-Type: text/plain
How can I do it using:
file: UploadFile = File(..., ???)
Thanks in advance
Right now, as this is not currently tightly integrated, the way to do it would be to modify the generated OpenAPI: https://fastapi.tiangolo.com/tutorial/extending-openapi/
I'll assume you were able to solve your use case, so I'll close this issue now. But feel free to add more comments or create new issues.
Current link: https://fastapi.tiangolo.com/advanced/extending-openapi/
FastAPI version: 0.60.1