简体   繁体   中英

Swagger Editor generated python-flask null type error

I created my rest-ful api endpoint documentation on Swagger hub/Swagger editor. I have python-sanic based restful api endpoints. I'm generate and run python-flask server but I received error message.

Uncaught TypeError: Swagger 2.0 does not support null types ([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

implies that you have type: null somewhere in your API definition. OpenAPI/Swagger 2.0 does not support nulls .

If you need nullable types, use OpenAPI 3.0 which supports nullable: true .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM