enable swagger empty body responses

This commit is contained in:
psmandzich
2020-07-21 09:50:47 +02:00
parent bec4f16676
commit 347f9da32e
3 changed files with 61 additions and 31 deletions

View File

@@ -129,9 +129,9 @@ module Rswag
end
def upgrade_content!(mime_list, target_node)
target_node.merge!(content: {})
schema = target_node[:schema]
return if mime_list.empty? || schema.nil?
target_node.merge!(content: {})
mime_list.each do |mime_type|
# TODO upgrade to have content-type specific schema