nullable fields in swagger on node.js

前端 未结 4 685
[愿得一人]
[愿得一人] 2021-01-04 02:42

I\'ve spent a bunch of time trying to find a solution for creating swagger docs in Node.JS. The main library is swagger-node, in which you create a swagger yaml file and the

4条回答
  •  天涯浪人
    2021-01-04 03:09

    nullable field is supported in OpenAPI (fka Swagger) Specification v3.0.0, but not in v2.0. Nullable types are defined as follows:

    # Can be string or null
    type: string
    nullable: true
    

提交回复
热议问题