Swagger UI将Schema模型的所有属性默认为optiona

时间:2018-09-05 08:23:13

标签: swagger swagger-ui

我有这个自定义Swagger UI json文件,该文件是我通过模式模型添加的,所有内容默认为可选。 所以我尝试为某些项目添加required:true,但似乎没有任何影响- “ PatchInfo”:{       “ type”:“对象”,       “属性”:{
        “ID”: {           “ type”:“ string”,           “必填”:true         }

以下链接讨论了类似的内容 https://github.com/swagger-api/swagger-ui/issues/1601 是否可以根据需要标记某些属性?

0 个答案:

没有答案