Swagger 编辑器生成 python-flask 空类型错误

Swagger Editor generated python-flask null type error

我在 Swagger hub/Swagger 编辑器上创建了我的 rest-ful api 端点文档。我有 python-基于 sanic 的 restful api 端点。我正在生成 运行 python-flask 服务器,但我收到了错误消息。

Uncaught TypeError: Swagger 2.0 does not support null types ([object Object]).

我已经调查了这个问题,但没有找到解决方案的结果。

浏览器控制台的错误信息:

Swagger 2.0 does not support null types

暗示您在 API 定义中的某处有 type: null。 OpenAPI/Swagger 2.0 .

如果您需要可空类型,请使用支持 nullable: true.

的 OpenAPI 3.0