Add new column in responses(Swagger-ui)

大城市里の小女人 提交于 2019-12-13 15:51:52

问题


I am using Swagger-ui for the api documentation, when i come to responses i want to add a new column of any name in every response, 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?

Is there any way type of Intellisense provided for Swagger-ui JSON?


回答1:


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).



来源:https://stackoverflow.com/questions/35014457/add-new-column-in-responsesswagger-ui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!