Skip to content

Commit

Permalink
[DEV-11363] Force response data to json for swagger.
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Giomi committed Apr 6, 2023
1 parent c0c1652 commit 0f58b82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/betterdocs/generator/swagger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def get_section_data(map, section)
end
ok = { schema: schema }
unless action.response.nil?
add_example(ok, 'example', JSON.parse(JSON.pretty_generate(action.response, quirks_mode: true)))
add_example(ok, 'example', JSON.parse(JSON.pretty_generate(action.response.to_json, quirks_mode: true)))
end
p[:responses] =
{ "200": wrap_content_object(ok, 'OK'),
Expand Down

0 comments on commit 0f58b82

Please sign in to comment.