pra*_*hra 5 python flask swagger flasgger
我正在开发一个需要通过flasgger UI 上传文件的项目。我根据 Swagger 文档修改了我的conf,但似乎不起作用。以下是我的会议。请告知错误。
"""
This API let's you train word embeddings
Call this api passing your file and get the word embeddings.
---
tags:
- Train (Word Embeddings)
consumes:
- multipart/form-data
parameters:
- in: formData
name: body
required: true
description: Upload your file.
responses:
500:
description: ERROR Failed!
200:
description: INFO Success!
schema:
$ref: '#/definitions/txt_embeddings'
"""
Run Code Online (Sandbox Code Playgroud)
您缺少“类型:文件”,以下内容对我有用:
...
parameters:
- name: file
required: false
in: formData
type: file
...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2041 次 |
| 最近记录: |