[英]Swagger Editor generated python-flask null type error
I created my rest-ful api endpoint documentation on Swagger hub/Swagger editor. 我在Swagger Hub / Swagger编辑器上创建了我的api端点文档。 I have python-sanic based restful api endpoints. 我有基于python-sanic的Restful api端点。 I'm generate and run python-flask server but I received error message. 我正在生成并运行python-flask服务器,但收到错误消息。
Uncaught TypeError: Swagger 2.0 does not support null types ([object Object]). 未捕获到的TypeError:Swagger 2.0不支持空类型([object Object])。
I have investigated this problem but have not found a result for the solution. 我已经研究了这个问题,但没有找到解决方案的结果。
The error message in the browser console: 浏览器控制台中的错误消息:
Swagger 2.0 does not support null types Swagger 2.0不支持null类型
implies that you have type: null
somewhere in your API definition. 表示您具有type: null
API定义中某处为type: null
。 OpenAPI/Swagger 2.0 does not support nulls . OpenAPI / Swagger 2.0 不支持null 。
If you need nullable types, use OpenAPI 3.0 which supports nullable: true
. 如果您需要可为null的类型,请使用支持nullable: true
OpenAPI 3.0 nullable: true
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.