在响应中添加新列(Swagger-ui) [英] Add new column in responses(Swagger-ui)

查看:186
本文介绍了在响应中添加新列(Swagger-ui)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用API​​文档时使用屏幕截图已附上,突出显示的文本还可以,我想在圆圈的位置添加一个新列. 我的响应JSON是

I am using screen shot is attached, highlighted text is ok, i want to add a new column at place of the circle. My response JSON is

 "responses" : {
           "400" : {
              "description" : "Invalid ID Supplied"
           },
           "404" : {
              "description" : "Order not found"
           }
        }

如何在其中添加新列?

how to add new column in it?

是否为Swagger-ui JSON提供了任何类型的Intellisense?

推荐答案

您只能扩展从API端点发出的API响应对象就规范而言.但是,为了在用户界面中显示它,您必须分叉 UI项目随你便目前,UI 似乎不可扩展此时(在文件中查找表标题).

You can extend the API Response objects coming off of your API endpoints only as far as the specification goes. In order to display that in the UI, though, you would have to fork the UI project and do as you please. Currently the UI does not seem to be extensible at that point (look for the table headers in the file).

这篇关于在响应中添加新列(Swagger-ui)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆