ruby-grape / grape-swagger

Add OAPI/swagger v2.0 compliant documentation to your grape API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swagger Rails UI do not render example responses

vuthehuyht opened this issue · comments

I want to add some examples of response to swagger to show it in the UI, but UI did not show it. I have checked swagger json file, examples of response had existed there and I tried to upload that json to SwaggerHub and it showed as I expected. I suggest, there are some problems when handling.
Here my code:
failure [ {code: 400, message: "Params invalid", model: Entities::V1::Error, examples: {"application/json" => {error_code: "400", message: "error message"}}}, {code: 401, message: "Unauthenticated", model: Entities::V1::Error, examples: {"application/json" => {error_code: "401", message: "error message"}}}, {code: 406, message: "Not Acceptable", model: Entities::V1::Error, examples: {"application/json" => {error_code: "406", message: "error message"}}} ]