add schema to mime type instead of overwriting

This commit is contained in:
Paul Filipow 2021-01-25 21:12:16 -08:00
parent 465950a65c
commit bd48e40529

View File

@ -135,7 +135,8 @@ module Rswag
mime_list.each do |mime_type|
# TODO upgrade to have content-type specific schema
target_node[:content][mime_type] = { schema: schema }
target_node[:content][mime_type] = {} if target_node[:content][mime_type].nil?
target_node[:content][mime_type][:schema] = schema
end
end