我在Swagger hub / Swagger编辑器上创建了我的rest-ful api endpoints 文档 . 我有基于python-sanic的restful api endpoints . 我生成并运行python-flask服务器,但收到错误消息 .
未捕获的TypeError:Swagger 2.0不支持空类型([object Object]) .
我已经调查了这个问题,但没有找到解决方案的结果 .
浏览器控制台中的错误消息:
Swagger 2.0不支持null类型
暗示您在API定义中的某个位置 type: null . OpenAPI / Swagger 2.0 does not support nulls .
type: null
如果需要可空类型,请使用支持 nullable: true 的OpenAPI 3.0 .
nullable: true
1 回答
浏览器控制台中的错误消息:
暗示您在API定义中的某个位置
type: null
. OpenAPI / Swagger 2.0 does not support nulls .如果需要可空类型,请使用支持
nullable: true
的OpenAPI 3.0 .