Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger Rails UI do not render example responses #838

Open
vuthehuyht opened this issue Oct 8, 2021 · 0 comments
Open

Swagger Rails UI do not render example responses #838

vuthehuyht opened this issue Oct 8, 2021 · 0 comments

Comments

@vuthehuyht
Copy link

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"}}} ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant